diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2018-08-23 15:39:17 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2018-08-23 15:39:17 (GMT) |
commit | 21eef8a98ee6949c69d79c6c4d87fc8e4e38dc29 (patch) | |
tree | b477826af1b6b47b1da9dfe948050ed7a50e75c4 /test | |
parent | 2ad049a6411923653365962c826cf59cf801d0d7 (diff) | |
parent | fd886ffd07164e23b13265098915f25870a8116e (diff) | |
download | hdf5-21eef8a98ee6949c69d79c6c4d87fc8e4e38dc29.zip hdf5-21eef8a98ee6949c69d79c6c4d87fc8e4e38dc29.tar.gz hdf5-21eef8a98ee6949c69d79c6c4d87fc8e4e38dc29.tar.bz2 |
squash! Commit version with new release date.hdf5-1_10_3
Merge branch 'hdf5_1_10_3' into 1.10/master
Diffstat (limited to 'test')
69 files changed, 8450 insertions, 6037 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b3b6f5c..517a620 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,17 +1,11 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TEST) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TEST C) #----------------------------------------------------------------------------- # 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 @@ -30,45 +24,39 @@ set (TEST_LIB_HEADERS ) add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") -if (MSVC) - target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib") -endif () +target_include_directories(${HDF5_TEST_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" +) +TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC) +target_link_libraries (${HDF5_TEST_LIB_TARGET} + PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET} + PRIVATE $<$<PLATFORM_ID:Windows>:ws2_32.lib> +) if (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib") endif () -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) -set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES - FOLDER libraries/test - INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" -) +H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0) if (BUILD_SHARED_LIBS) add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) - TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") - if (MSVC) - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib") - endif () + target_include_directories(${HDF5_TEST_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" + ) + target_compile_definitions(${HDF5_TEST_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE> + ) + TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} + PUBLIC ${LINK_LIBS} ${HDF5_LIBSH_TARGET} + PRIVATE $<$<PLATFORM_ID:Windows>:ws2_32.lib> + ) if (MINGW) target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "wsock32.lib") endif () - 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 ${HDF5_PACKAGE_SOVERSION}) - set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES - FOLDER libraries/test - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET ${HDF5_TEST_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () + 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) endif () ################################################################################# @@ -94,13 +82,12 @@ endif () 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_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") + target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + 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 ${HDF5_PACKAGE_SOVERSION}) + 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) #----------------------------------------------------------------------------- @@ -120,13 +107,12 @@ endif () 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_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") + target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + 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 ${HDF5_PACKAGE_SOVERSION}) + 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) #----------------------------------------------------------------------------- @@ -214,6 +200,7 @@ set (H5_TESTS cmpd_dset filter_fail extend + direct_chunk # compression lib link external efc objcopy @@ -251,18 +238,21 @@ set (H5_TESTS macro (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) + target_include_directories(${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${file} STATIC) + target_link_libraries (${file} PRIVATE ${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) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + target_include_directories(${file}-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${file}-shared SHARED) + target_link_libraries (${file}-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (${file}-shared PROPERTIES FOLDER test) endif () endmacro () set (H5_TESTS_MULTIPLE + direct_chunk testhdf5 cache_image ttsafe @@ -277,47 +267,63 @@ endforeach () ############################################################################## ### M U L T I P L E S O U R C E T E S T S ### ############################################################################## +######### Also special handling of link libs ############# +#-- Adding test for direct_chunk +add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c) +target_include_directories(direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (direct_chunk STATIC) +target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS}) +set_target_properties (direct_chunk PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (direct_chunk-shared ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c) + target_include_directories(direct_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (direct_chunk-shared SHARED) + target_link_libraries (direct_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS}) + set_target_properties (direct_chunk-shared PROPERTIES FOLDER test) +endif () + +######### Special handling for multiple sources ############# #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SOURCES}) -TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") -target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) +target_include_directories(testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (testhdf5 STATIC) +target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (testhdf5-shared ${testhdf5_SOURCES}) - TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") - target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + target_include_directories(testhdf5-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (testhdf5-shared SHARED) + target_link_libraries (testhdf5-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (testhdf5-shared PROPERTIES FOLDER test) endif () #-- Adding test for cache_image add_executable (cache_image ${cache_image_SOURCES}) -TARGET_C_PROPERTIES (cache_image STATIC " " " ") -target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (cache_image STATIC) +target_link_libraries (cache_image PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_image PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (cache_image-shared ${cache_image_SOURCES}) - TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") - target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(cache_image-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (cache_image-shared SHARED) + target_link_libraries (cache_image-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) endif () #-- Adding test for ttsafe add_executable (ttsafe ${ttsafe_SOURCES}) -TARGET_C_PROPERTIES (ttsafe STATIC " " " ") -target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (ttsafe STATIC) +target_link_libraries (ttsafe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (ttsafe-shared ${ttsafe_SOURCES}) - TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") - target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(ttsafe-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ttsafe-shared SHARED) + target_link_libraries (ttsafe-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (ttsafe-shared PROPERTIES FOLDER test) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET ttsafe-shared - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () endif () ############################################################################## @@ -387,8 +393,9 @@ endforeach () # 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_C_PROPERTIES (accum_swmr_reader STATIC " " " ") -target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (accum_swmr_reader STATIC) +target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (accum_swmr_reader PROPERTIES FOLDER test) #-- Set accum dependencies @@ -402,13 +409,15 @@ endif () ############################################################################## if (BUILD_SHARED_LIBS) add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_C_PROPERTIES (filter_plugin SHARED " " " ") - target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) + target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (filter_plugin SHARED) + target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) else () add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_C_PROPERTIES (filter_plugin STATIC " " " ") - target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) + target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (filter_plugin STATIC) + target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) endif () @@ -417,37 +426,43 @@ 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_C_PROPERTIES (use_append_chunk STATIC " " " ") -target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_append_chunk STATIC) +target_link_libraries (use_append_chunk PRIVATE ${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_C_PROPERTIES (use_append_chunk-shared SHARED " " " ") - target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_append_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_append_chunk-shared SHARED) + target_link_libraries (use_append_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test) 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_C_PROPERTIES (use_append_mchunks STATIC " " " ") -target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_append_mchunks STATIC) +target_link_libraries (use_append_mchunks PRIVATE ${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_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ") - target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_append_mchunks-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED) + target_link_libraries (use_append_mchunks-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test) 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_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ") -target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC) +target_link_libraries (use_disable_mdc_flushes PRIVATE ${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_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ") - target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_disable_mdc_flushes-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED) + target_link_libraries (use_disable_mdc_flushes-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test) endif () diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 221b857..cc6ebb8 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -228,29 +228,30 @@ add_test (NAME H5TEST-clear-testhdf5-objects WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP clear_testhdf5) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select) set_tests_properties (H5TEST-testhdf5-base PROPERTIES - DEPENDS H5TEST-clear-testhdf5-objects + FIXTURES_REQUIRED clear_testhdf5 ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap) set_tests_properties (H5TEST-testhdf5-heap PROPERTIES - DEPENDS H5TEST-clear-testhdf5-objects + FIXTURES_REQUIRED clear_testhdf5 ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file) set_tests_properties (H5TEST-testhdf5-file PROPERTIES - DEPENDS H5TEST-clear-testhdf5-objects + FIXTURES_REQUIRED clear_testhdf5 ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select) set_tests_properties (H5TEST-testhdf5-select PROPERTIES - DEPENDS H5TEST-clear-testhdf5-objects + FIXTURES_REQUIRED clear_testhdf5 ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -266,7 +267,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-testhdf5 PROPERTIES - DEPENDS H5TEST-clear-testhdf5-objects + FIXTURES_REQUIRED clear_testhdf5 ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -295,6 +296,7 @@ else () WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP shared_clear_testhdf5) add_test (NAME H5TEST-shared-testhdf5 COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5-shared>" -D "TEST_ARGS:STRING=" @@ -306,7 +308,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES - DEPENDS H5TEST-shared-clear-testhdf5-objects + FIXTURES_REQUIRED shared_clear_testhdf5 ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -532,6 +534,7 @@ set (test_CLEANFILES vds_swmr.h5 vds_swmr_src_*.h5 tmp/vds_src_2.h5 + direct_chunk.h5 ) # Remove any output file left over from previous test run @@ -542,6 +545,7 @@ add_test (NAME H5TEST-clear-objects WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP clear_objects) set (H5TEST_SEPARATE_TESTS testhdf5 @@ -553,7 +557,7 @@ foreach (test ${H5_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 + FIXTURES_REQUIRED clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -575,7 +579,7 @@ foreach (test ${H5_TESTS}) ) endif () set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects + FIXTURES_REQUIRED clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -598,6 +602,7 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-clear-objects PROPERTIES FIXTURES_SETUP shared_clear_objects) foreach (test ${H5_TESTS}) if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS) @@ -618,7 +623,7 @@ if (BUILD_SHARED_LIBS) ) endif () set_tests_properties (H5TEST-shared-${test} PROPERTIES - DEPENDS H5TEST-shared-clear-objects + FIXTURES_REQUIRED shared_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -641,6 +646,7 @@ if (NOT CYGWIN) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) + set_tests_properties (H5TEST-clear-cache-objects PROPERTIES FIXTURES_SETUP cache_clear_objects) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>) else () @@ -656,8 +662,8 @@ if (NOT CYGWIN) ) endif () set_tests_properties (H5TEST-cache PROPERTIES - DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=3" + FIXTURES_REQUIRED cache_clear_objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 1800) @@ -672,10 +678,11 @@ add_test ( WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-cache_image-objects PROPERTIES FIXTURES_SETUP cache_image_clear_objects) 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=3" + FIXTURES_REQUIRED cache_image_clear_objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -689,6 +696,7 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP shared_cache_clear_objects) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>) else () @@ -704,7 +712,7 @@ if (BUILD_SHARED_LIBS) ) endif () set_tests_properties (H5TEST-shared-cache PROPERTIES - DEPENDS H5TEST-shared-clear-cache-objects + FIXTURES_REQUIRED shared_cache_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -712,6 +720,23 @@ if (BUILD_SHARED_LIBS) endif () endif () +#-- Adding test for tcheck_version +add_test (NAME H5TEST-tcheck_version-major COMMAND $<TARGET_FILE:tcheck_version> "-tM") +set_tests_properties (H5TEST-tcheck_version-major PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + WILL_FAIL "true" +) +add_test (NAME H5TEST-tcheck_version-minor COMMAND $<TARGET_FILE:tcheck_version> "-tm") +set_tests_properties (H5TEST-tcheck_version-minor PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + WILL_FAIL "true" +) +add_test (NAME H5TEST-tcheck_version-release COMMAND $<TARGET_FILE:tcheck_version> "-tr") +set_tests_properties (H5TEST-tcheck_version-release PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + WILL_FAIL "true" +) + ############################################################################## ############################################################################## @@ -722,7 +747,6 @@ endif () #--------------- # error_test # err_compat -# tcheck_version # testmeta # atomic_writer # atomic_reader @@ -732,7 +756,6 @@ endif () ############################################################################## # 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 @@ -755,9 +778,10 @@ add_test ( WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-filenotclosed-objects PROPERTIES FIXTURES_SETUP filenotclosed_clear_objects) add_test (NAME H5TEST-filenotclosed COMMAND $<TARGET_FILE:filenotclosed>) set_tests_properties (H5TEST-filenotclosed PROPERTIES - DEPENDS H5TEST-clear-filenotclosed-objects + FIXTURES_REQUIRED filenotclosed_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -772,6 +796,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) + set_tests_properties (H5TEST-clear-err_compat-objects PROPERTIES FIXTURES_SETUP err_compat_clear_objects) add_test (NAME H5TEST-err_compat COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:err_compat>" -D "TEST_ARGS:STRING=" @@ -783,7 +808,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-err_compat PROPERTIES - DEPENDS H5TEST-clear-err_compat-objects + FIXTURES_REQUIRED err_compat_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -798,6 +823,7 @@ add_test (NAME H5TEST-clear-error_test-objects WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-error_test-objects PROPERTIES FIXTURES_SETUP error_test_clear_objects) if (HDF5_USE_16_API_DEFAULT) add_test ( NAME H5TEST-error_test-SKIPPED @@ -815,7 +841,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-error_test PROPERTIES - DEPENDS H5TEST-clear-error_test-objects + FIXTURES_REQUIRED error_test_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -833,6 +859,7 @@ add_test (NAME H5TEST-clear-links_env-objects WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +set_tests_properties (H5TEST-clear-links_env-objects PROPERTIES FIXTURES_SETUP links_env_clear_objects) add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:links_env>" -D "TEST_ARGS:STRING=" @@ -845,7 +872,7 @@ add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-links_env PROPERTIES - DEPENDS H5TEST-clear-links_env-objects + FIXTURES_REQUIRED links_env_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -868,6 +895,7 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-clear-err_compat-objects PROPERTIES FIXTURES_SETUP shared_err_compat_clear_objects) add_test (NAME H5TEST-shared-err_compat COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:err_compat-shared>" -D "TEST_ARGS:STRING=" @@ -879,7 +907,7 @@ if (BUILD_SHARED_LIBS) -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-shared-err_compat PROPERTIES - DEPENDS H5TEST-shared-clear-err_compat-objects + FIXTURES_REQUIRED shared_err_compat_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -894,6 +922,7 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-clear-error_test-objects PROPERTIES FIXTURES_SETUP shared_error_test_clear_objects) if (HDF5_USE_16_API_DEFAULT) add_test ( NAME H5TEST-shared-error_test-SKIPPED @@ -911,7 +940,7 @@ if (BUILD_SHARED_LIBS) -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-shared-error_test PROPERTIES - DEPENDS H5TEST-shared-clear-error_test-objects + FIXTURES_REQUIRED shared_error_test_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -929,6 +958,7 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-clear-links_env-objects PROPERTIES FIXTURES_SETUP shared_links_env_clear_objects) add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:links_env-shared>" -D "TEST_ARGS:STRING=" @@ -941,7 +971,7 @@ if (BUILD_SHARED_LIBS) -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5TEST-shared-links_env PROPERTIES - DEPENDS H5TEST-shared-clear-links_env-objects + FIXTURES_REQUIRED shared_links_env_clear_objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) @@ -981,13 +1011,60 @@ set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES #) ############################################################################## -############################################################################## -### S W M R T E S T S -############################################################################## -# testflushrefresh.sh: flushrefresh -# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes -# testswmr.sh: swmr* -# testvdsswmr.sh: vds_swmr* +if (TEST_SHELL_SCRIPTS) + include (ShellTests.cmake) +endif() + +if (ENABLE_EXTENDED_TESTS) + ############################################################################## + ### S W M R T E S T S + ############################################################################## + # testflushrefresh.sh: flushrefresh + # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes + # testswmr.sh: swmr* + # testvdsswmr.sh: vds_swmr* + +# add_test (NAME H5Test-swmr_check_compat_vfd COMMAND $<TARGET_FILE:swmr_check_compat_vfd>) + +#-- Adding test for flushrefresh + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test") + if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/flushrefresh_test") + endif () + find_package (Perl) + if (PERL_FOUND) + add_test (NAME H5TEST-clear-testflushrefresh-objects + COMMAND ${CMAKE_COMMAND} + -E remove + flushrefresh.txt + flushrefresh.txt.err + flushrefresh.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test + ) + set_tests_properties (H5TEST-clear-testflushrefresh-objects PROPERTIES FIXTURES_SETUP testflushrefresh_clear_objects) + add_test (NAME H5TEST-testflushrefresh COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:flushrefresh>" + -D "TEST_ARGS1:STRING=flushrefresh_VERIFICATION_START" + -D "TEST_ARGS2:STRING=flushrefresh_VERIFICATION_DONE" + -D "TEST_ERR:STRING=flushrefresh_ERROR" + -D "TEST_EXPECT=0" + -D "TEST_OUTPUT=flushrefresh.out" + -D "TEST_REFERENCE=flushrefresh.txt" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test" + -D "PERL_SCRIPT=${HDF5_SOURCE_DIR}/bin/runbkgprog" + -D "PERL_EXECUTABLE=${PERL_EXECUTABLE}" + -P "${HDF5_TEST_SOURCE_DIR}/flushrefreshTest.cmake" + ) + set_tests_properties (H5TEST-testflushrefresh PROPERTIES + FIXTURES_REQUIRED testflushrefresh_clear_objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test + ) + else () + message (STATUS "Cannot execute TEST flushrefresh - perl not found") + endif () +endif() ############################################################################## ############################################################################## @@ -1008,8 +1085,9 @@ endif () if (HDF5_BUILD_GENERATORS) macro (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) - TARGET_C_PROPERTIES (${genfile} STATIC " " " ") - target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${genfile} STATIC) + target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/test) endmacro () diff --git a/test/Makefile.am b/test/Makefile.am index ab81f50..b9aa3fb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -34,7 +34,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src # 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) test_filenotclosed$(EXEEXT) \ +SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) 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) \ @@ -55,11 +55,12 @@ TEST_PROG= testhdf5 \ cache cache_api cache_image cache_tagging lheap ohdr stab gheap \ evict_on_close farray earray btree2 fheap \ pool accum hyperslab istore bittests dt_arith page_buffer \ - 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 vds file_image unregister cache_logging cork swmr + dtypes dsets cmpd_dset filter_fail extend direct_chunk 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 vds file_image unregister \ + cache_logging cork swmr # List programs to be built when testing here. # error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. @@ -114,6 +115,8 @@ if HAVE_SHARED_CONDITIONAL 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 + libfilter_plugin3_dsets_la_LIBADD=$(LIBHDF5) + libfilter_plugin4_groups_la_LIBADD=$(LIBHDF5) else # The libh5test library provides common support code for the tests. noinst_LTLIBRARIES=libh5test.la @@ -190,7 +193,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse flushrefresh_VERIFICATION_DONE atomic_data accum_swmr_big.h5 ohdr_swmr.h5 \ test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \ swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \ - tbogus.h5.copy cache_image_test.h5 + tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/Makefile.in b/test/Makefile.in index 9a87f5a..2462866 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -182,7 +182,8 @@ libfilter_plugin2_dsets_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_CFLAGS) $(CFLAGS) $(libfilter_plugin2_dsets_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_SHARED_CONDITIONAL_TRUE@am_libfilter_plugin2_dsets_la_rpath = -libfilter_plugin3_dsets_la_LIBADD = +@HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin3_dsets_la_DEPENDENCIES = \ +@HAVE_SHARED_CONDITIONAL_TRUE@ $(LIBHDF5) am__libfilter_plugin3_dsets_la_SOURCES_DIST = filter_plugin3_dsets.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libfilter_plugin3_dsets_la_OBJECTS = \ @HAVE_SHARED_CONDITIONAL_TRUE@ filter_plugin3_dsets.lo @@ -193,7 +194,8 @@ libfilter_plugin3_dsets_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_CFLAGS) $(CFLAGS) $(libfilter_plugin3_dsets_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_SHARED_CONDITIONAL_TRUE@am_libfilter_plugin3_dsets_la_rpath = -libfilter_plugin4_groups_la_LIBADD = +@HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin4_groups_la_DEPENDENCIES = \ +@HAVE_SHARED_CONDITIONAL_TRUE@ $(LIBHDF5) am__libfilter_plugin4_groups_la_SOURCES_DIST = \ filter_plugin4_groups.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libfilter_plugin4_groups_la_OBJECTS = \ @@ -219,8 +221,8 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \ hyperslab$(EXEEXT) istore$(EXEEXT) bittests$(EXEEXT) \ dt_arith$(EXEEXT) page_buffer$(EXEEXT) dtypes$(EXEEXT) \ dsets$(EXEEXT) cmpd_dset$(EXEEXT) filter_fail$(EXEEXT) \ - extend$(EXEEXT) external$(EXEEXT) efc$(EXEEXT) \ - objcopy$(EXEEXT) links$(EXEEXT) unlink$(EXEEXT) \ + extend$(EXEEXT) direct_chunk$(EXEEXT) external$(EXEEXT) \ + efc$(EXEEXT) objcopy$(EXEEXT) links$(EXEEXT) unlink$(EXEEXT) \ twriteorder$(EXEEXT) big$(EXEEXT) mtime$(EXEEXT) \ fillval$(EXEEXT) mount$(EXEEXT) flush1$(EXEEXT) \ flush2$(EXEEXT) app_ref$(EXEEXT) enum$(EXEEXT) \ @@ -311,6 +313,10 @@ dangle_SOURCES = dangle.c dangle_OBJECTS = dangle.$(OBJEXT) dangle_LDADD = $(LDADD) dangle_DEPENDENCIES = libh5test.la $(LIBHDF5) +direct_chunk_SOURCES = direct_chunk.c +direct_chunk_OBJECTS = direct_chunk.$(OBJEXT) +direct_chunk_LDADD = $(LDADD) +direct_chunk_DEPENDENCIES = libh5test.la $(LIBHDF5) dsets_SOURCES = dsets.c dsets_OBJECTS = dsets.$(OBJEXT) dsets_LDADD = $(LDADD) @@ -727,17 +733,17 @@ SOURCES = $(libfilter_plugin1_dsets_la_SOURCES) \ accum.c accum_swmr_reader.c app_ref.c atomic_reader.c \ atomic_writer.c big.c bittests.c btree2.c cache.c cache_api.c \ $(cache_image_SOURCES) cache_logging.c cache_tagging.c \ - cmpd_dset.c cork.c cross_read.c dangle.c dsets.c dt_arith.c \ - dtransform.c dtypes.c earray.c efc.c enc_dec_plist.c \ - enc_dec_plist_cross_platform.c enum.c err_compat.c \ - error_test.c evict_on_close.c extend.c external.c farray.c \ - fheap.c file_image.c filenotclosed.c fillval.c filter_fail.c \ - filter_plugin.c flush1.c flush2.c flushrefresh.c freespace.c \ - gen_bad_offset.c gen_bad_ohdr.c gen_bogus.c gen_bounds.c \ - gen_cross.c gen_deflate.c gen_file_image.c gen_filespace.c \ - gen_filters.c gen_new_array.c gen_new_fill.c gen_new_group.c \ - gen_new_mtime.c gen_new_super.c gen_noencoder.c \ - gen_nullspace.c gen_plist.c gen_sizes_lheap.c \ + cmpd_dset.c cork.c cross_read.c dangle.c direct_chunk.c \ + dsets.c dt_arith.c dtransform.c dtypes.c earray.c efc.c \ + enc_dec_plist.c enc_dec_plist_cross_platform.c enum.c \ + err_compat.c error_test.c evict_on_close.c extend.c external.c \ + farray.c fheap.c file_image.c filenotclosed.c fillval.c \ + filter_fail.c filter_plugin.c flush1.c flush2.c flushrefresh.c \ + freespace.c gen_bad_offset.c gen_bad_ohdr.c gen_bogus.c \ + gen_bounds.c gen_cross.c gen_deflate.c gen_file_image.c \ + gen_filespace.c gen_filters.c gen_new_array.c gen_new_fill.c \ + gen_new_group.c gen_new_mtime.c gen_new_super.c \ + gen_noencoder.c gen_nullspace.c gen_plist.c gen_sizes_lheap.c \ gen_specmetaread.c gen_udlinks.c getname.c gheap.c hyperslab.c \ istore.c lheap.c links.c links_env.c mf.c mount.c mtime.c \ ntypes.c objcopy.c ohdr.c page_buffer.c pool.c reserved.c \ @@ -758,15 +764,15 @@ DIST_SOURCES = $(am__libfilter_plugin1_dsets_la_SOURCES_DIST) \ atomic_reader.c atomic_writer.c big.c bittests.c btree2.c \ cache.c cache_api.c $(cache_image_SOURCES) cache_logging.c \ cache_tagging.c cmpd_dset.c cork.c cross_read.c dangle.c \ - dsets.c dt_arith.c dtransform.c dtypes.c earray.c efc.c \ - enc_dec_plist.c enc_dec_plist_cross_platform.c enum.c \ - err_compat.c error_test.c evict_on_close.c extend.c external.c \ - farray.c fheap.c file_image.c filenotclosed.c fillval.c \ - filter_fail.c filter_plugin.c flush1.c flush2.c flushrefresh.c \ - freespace.c gen_bad_offset.c gen_bad_ohdr.c gen_bogus.c \ - gen_bounds.c gen_cross.c gen_deflate.c gen_file_image.c \ - gen_filespace.c gen_filters.c gen_new_array.c gen_new_fill.c \ - gen_new_group.c gen_new_mtime.c gen_new_super.c \ + direct_chunk.c dsets.c dt_arith.c dtransform.c dtypes.c \ + earray.c efc.c enc_dec_plist.c enc_dec_plist_cross_platform.c \ + enum.c err_compat.c error_test.c evict_on_close.c extend.c \ + external.c farray.c fheap.c file_image.c filenotclosed.c \ + fillval.c filter_fail.c filter_plugin.c flush1.c flush2.c \ + flushrefresh.c freespace.c gen_bad_offset.c gen_bad_ohdr.c \ + gen_bogus.c gen_bounds.c gen_cross.c gen_deflate.c \ + gen_file_image.c gen_filespace.c gen_filters.c gen_new_array.c \ + gen_new_fill.c gen_new_group.c gen_new_mtime.c gen_new_super.c \ gen_noencoder.c gen_nullspace.c gen_plist.c gen_sizes_lheap.c \ gen_specmetaread.c gen_udlinks.c getname.c gheap.c hyperslab.c \ istore.c lheap.c links.c links_env.c mf.c mount.c mtime.c \ @@ -1142,6 +1148,7 @@ JAVA_PATH_NAME = @JAVA_PATH_NAME@ JAVA_VERSION = @JAVA_VERSION@ JNIFLAGS = @JNIFLAGS@ JUNIT = @JUNIT@ +LARGE_PARALLEL_IO = @LARGE_PARALLEL_IO@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -1189,6 +1196,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@ PARALLEL = @PARALLEL@ +PARALLEL_FILTERED_WRITES = @PARALLEL_FILTERED_WRITES@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROFILING = @PROFILING@ RANLIB = @RANLIB@ @@ -1382,7 +1390,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ ohdr_swmr.h5 test_swmr*.h5 cache_logging.h5 cache_logging.out \ vds_swmr.h5 vds_swmr_src_*.h5 swmr[0-2].h5 swmr_writer.out \ swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \ - tbogus.h5.copy cache_image_test.h5 + tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 # Test scripts-- # testerror.sh: err_compat, error_test @@ -1400,7 +1408,7 @@ TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ testvdsswmr.sh testflushrefresh.sh test_usecases.sh \ $(am__append_1) SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) \ - links_env$(EXEEXT) test_filenotclosed$(EXEEXT) \ + links_env$(EXEEXT) filenotclosed$(EXEEXT) \ flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) \ use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \ swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) \ @@ -1420,11 +1428,12 @@ TEST_PROG = testhdf5 \ cache cache_api cache_image cache_tagging lheap ohdr stab gheap \ evict_on_close farray earray btree2 fheap \ pool accum hyperslab istore bittests dt_arith page_buffer \ - 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 vds file_image unregister cache_logging cork swmr + dtypes dsets cmpd_dset filter_fail extend direct_chunk 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 vds file_image unregister \ + cache_logging cork swmr # These programs generate test files for the tests. They don't need to be @@ -1449,6 +1458,8 @@ BUILD_ALL_PROGS = gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_n @HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin2_dsets_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere @HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin3_dsets_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere @HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin4_groups_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere +@HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin3_dsets_la_LIBADD = $(LIBHDF5) +@HAVE_SHARED_CONDITIONAL_TRUE@libfilter_plugin4_groups_la_LIBADD = $(LIBHDF5) libh5test_la_SOURCES = h5test.c testframe.c cache_common.c swmr_common.c # Use libhd5test.la to compile all of the tests @@ -1668,6 +1679,10 @@ dangle$(EXEEXT): $(dangle_OBJECTS) $(dangle_DEPENDENCIES) $(EXTRA_dangle_DEPENDE @rm -f dangle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dangle_OBJECTS) $(dangle_LDADD) $(LIBS) +direct_chunk$(EXEEXT): $(direct_chunk_OBJECTS) $(direct_chunk_DEPENDENCIES) $(EXTRA_direct_chunk_DEPENDENCIES) + @rm -f direct_chunk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(direct_chunk_OBJECTS) $(direct_chunk_LDADD) $(LIBS) + dsets$(EXEEXT): $(dsets_OBJECTS) $(dsets_DEPENDENCIES) $(EXTRA_dsets_DEPENDENCIES) @rm -f dsets$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dsets_OBJECTS) $(dsets_LDADD) $(LIBS) @@ -2052,6 +2067,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cross_read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dangle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_chunk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dt_arith.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtransform.Po@am__quote@ @@ -2574,6 +2590,13 @@ extend.log: extend$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +direct_chunk.log: direct_chunk$(EXEEXT) + @p='direct_chunk$(EXEEXT)'; \ + b='direct_chunk'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) external.log: external$(EXEEXT) @p='external$(EXEEXT)'; \ b='external'; \ diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake new file mode 100644 index 0000000..58dc85d --- /dev/null +++ b/test/ShellTests.cmake @@ -0,0 +1,216 @@ + +# 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 S H E L L S C R I P T S ### +############################################################################## + +if (UNIX) + + find_program (SH_PROGRAM sh) + if (SH_PROGRAM) + + ############################################################################## + # configure scripts to test dir + ############################################################################## + find_package (Perl) + if (PERL_FOUND) + configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY) + endif () + configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh @ONLY) + configure_file(${HDF5_TEST_SOURCE_DIR}/testvdsswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh @ONLY) + + ############################################################################## + # copy test programs to test dir + ############################################################################## + add_custom_command ( + TARGET swmr_check_compat_vfd + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_check_compat_vfd>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_check_compat_vfd" + ) + + add_custom_command ( + TARGET swmr_check_compat_vfd + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh" + ) + + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test") + add_custom_command ( + TARGET flushrefresh + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:flushrefresh>" "${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh" + ) + + #shell script creates dir + #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test") + add_custom_command ( + TARGET use_append_mchunks + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:use_append_mchunks>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_mchunks" + ) + add_custom_command ( + TARGET use_disable_mdc_flushes + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:use_disable_mdc_flushes>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_disable_mdc_flushes" + ) + add_custom_command ( + TARGET twriteorder + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:twriteorder>" "${HDF5_TEST_BINARY_DIR}/H5TEST/twriteorder" + ) + add_custom_command ( + TARGET use_append_chunk + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:use_append_chunk>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_chunk" + ) + + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test") + add_custom_command ( + TARGET swmr_generator + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_generator>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_generator" + ) + add_custom_command ( + TARGET swmr_start_write + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_start_write>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_start_write" + ) + add_custom_command ( + TARGET swmr_reader + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_reader" + ) + add_custom_command ( + TARGET swmr_writer + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_writer" + ) + add_custom_command ( + TARGET swmr_remove_reader + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_reader" + ) + add_custom_command ( + TARGET swmr_remove_writer + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_writer" + ) + add_custom_command ( + TARGET swmr_addrem_writer + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_addrem_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_addrem_writer" + ) + add_custom_command ( + TARGET swmr_sparse_reader + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_reader" + ) + add_custom_command ( + TARGET swmr_sparse_writer + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_writer" + ) + + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test") + add_custom_command ( + TARGET vds_swmr_gen + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_gen>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_gen" + ) + add_custom_command ( + TARGET vds_swmr_writer + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_writer" + ) + add_custom_command ( + TARGET vds_swmr_reader + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_reader" + ) + + + + ############################################################################## + ############################################################################## + ### A D D I T I O N A L T E S T S ### + ############################################################################## + ############################################################################## + # H5_CHECK_TESTS + #--------------- + # atomic_writer + # atomic_reader + # 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 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. + ############################################################################## + + ############################################################################## + ### S W M R T E S T S + ############################################################################## + # testflushrefresh.sh: flushrefresh + # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes + # testswmr.sh: swmr* + # testvdsswmr.sh: vds_swmr* + add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh) + set_tests_properties (H5SHELL-testflushrefresh PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + add_test (H5SHELL-test_usecases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh) + set_tests_properties (H5SHELL-test_usecases PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + add_test (H5SHELL-testswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh) + set_tests_properties (H5SHELL-testswmr PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + add_test (H5SHELL-testvdsswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh) + set_tests_properties (H5SHELL-testvdsswmr PROPERTIES + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + + endif () +endif () diff --git a/test/accum.c b/test/accum.c index d76c866..19006b6 100644 --- a/test/accum.c +++ b/test/accum.c @@ -20,6 +20,8 @@ #define H5FD_TESTING #include "H5Fpkg.h" #include "H5FDpkg.h" + +#include "H5CXprivate.h" /* API Contexts */ #include "H5Iprivate.h" /* Filename */ @@ -39,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 */ @@ -88,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"); @@ -98,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 @@ -105,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 @@ -142,6 +146,8 @@ main(void) return 0; error: + if(api_ctx_pushed) H5CX_pop(); + puts("*** TESTS FAILED ***"); return 1; } /* end main() */ @@ -165,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; @@ -188,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(); @@ -221,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; @@ -241,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(); @@ -280,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; @@ -300,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(); @@ -339,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; @@ -362,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; @@ -406,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; @@ -420,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; @@ -434,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; @@ -448,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; @@ -462,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; @@ -476,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; @@ -492,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(); @@ -526,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; @@ -662,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(); @@ -698,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; @@ -724,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; @@ -764,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; @@ -774,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; @@ -794,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; @@ -804,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; @@ -842,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(); @@ -877,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; @@ -909,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(); @@ -944,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; @@ -976,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(); @@ -1022,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 */ @@ -1068,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 */ @@ -1097,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 */ @@ -1111,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 */ @@ -1132,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, */ @@ -1146,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; @@ -1172,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, */ @@ -1183,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) */ @@ -1209,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 */ @@ -1240,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(); @@ -1278,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 */ @@ -1323,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(); @@ -1357,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 */ @@ -1393,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 */ @@ -1412,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 */ @@ -1430,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 */ @@ -1448,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 */ @@ -1470,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 */ @@ -1493,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 */ @@ -1521,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 */ @@ -1549,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 */ @@ -1576,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 */ @@ -1604,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 */ @@ -1628,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(); @@ -1665,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 */ @@ -1765,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(); @@ -1819,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)) @@ -1871,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) @@ -1890,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 */ @@ -1904,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 */ @@ -1925,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) @@ -1936,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) @@ -1950,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 */ @@ -1962,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) @@ -1987,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); @@ -2015,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 c1a238d..5bda46a 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -17,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() */ @@ -48,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. @@ -70,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 */ @@ -88,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/btree2.c b/test/btree2.c index 4c820b3..d26fed5 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -25,6 +25,7 @@ #include "H5B2pkg.h" /* Other private headers that this test requires */ +#include "H5CXprivate.h" /* API Contexts */ #include "H5Iprivate.h" const char *FILENAME[] = { @@ -145,11 +146,11 @@ error: *------------------------------------------------------------------------- */ static int -create_btree(H5F_t *f, hid_t dxpl, const H5B2_create_t *cparam, +create_btree(H5F_t *f, const H5B2_create_t *cparam, H5B2_t **bt2, haddr_t *bt2_addr) { /* Create the v2 B-tree & get its address */ - if(NULL == (*bt2 = H5B2_create(f, dxpl, cparam, f))) + if(NULL == (*bt2 = H5B2_create(f, cparam, f))) FAIL_STACK_ERROR if(H5B2_get_addr(*bt2, bt2_addr/*out*/) < 0) FAIL_STACK_ERROR @@ -219,17 +220,17 @@ error: *------------------------------------------------------------------------- */ static int -reopen_btree(H5F_t *f, hid_t dxpl, H5B2_t **bt2, haddr_t bt2_addr, +reopen_btree(H5F_t *f, H5B2_t **bt2, haddr_t bt2_addr, const bt2_test_param_t *tparam) { /* Check for closing & re-opening the B-tree */ if(tparam->reopen_btree) { /* Close (empty) v2 B-tree */ - if(H5B2_close(*bt2, dxpl) < 0) + if(H5B2_close(*bt2) < 0) FAIL_STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (*bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (*bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR } /* end if */ @@ -289,11 +290,11 @@ error: *------------------------------------------------------------------------- */ static int -check_node_depth(H5B2_t *bt2, hid_t dxpl, void *record, unsigned depth) +check_node_depth(H5B2_t *bt2, void *record, unsigned depth) { int rec_depth; /* Depth of record in B-tree */ - if((rec_depth = H5B2_get_node_depth_test(bt2, dxpl, record)) < 0) + if((rec_depth = H5B2__get_node_depth_test(bt2, record)) < 0) FAIL_STACK_ERROR if((unsigned)rec_depth != depth) TEST_ERROR @@ -320,12 +321,12 @@ error: *------------------------------------------------------------------------- */ static int -check_node_info(H5B2_t *bt2, hid_t dxpl, hsize_t record, +check_node_info(H5B2_t *bt2, hsize_t record, H5B2_node_info_test_t *ninfo) { H5B2_node_info_test_t rec_ninfo; /* Node info for record in B-tree */ - if(H5B2_get_node_info_test(bt2, dxpl, &record, &rec_ninfo) < 0) + if(H5B2__get_node_info_test(bt2, &record, &rec_ninfo) < 0) FAIL_STACK_ERROR if(rec_ninfo.depth != ninfo->depth) TEST_ERROR @@ -655,7 +656,6 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -672,7 +672,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR PASSED(); @@ -683,12 +683,12 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree iteration: empty B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to iterate over a B-tree with no records */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index hasn't changed */ if(idx != 0) @@ -696,13 +696,13 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find record in B-tree with no records */ idx = 0; - if(H5B2_find(bt2, dxpl, &idx, find_cb, NULL) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, NULL) != FALSE) TEST_ERROR /* Attempt to index record in B-tree with no records */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -716,37 +716,37 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: first record"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ idx = 41; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &idx, NULL, NULL) != FALSE) TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ idx = 42; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) TEST_ERROR /* Try again with NULL 'op' */ - if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &idx, NULL, NULL) != TRUE) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -754,7 +754,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ idx = 42; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) TEST_ERROR PASSED(); @@ -765,45 +765,45 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: several records"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* * Test inserting second record into v2 B-tree, before all other records */ record = 34; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* * Test inserting third record into v2 B-tree, after all other records */ record = 56; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* * Test inserting fourth record into v2 B-tree, in the middle of other records */ record = 38; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ idx = 41; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ idx = 56; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -811,20 +811,20 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ idx = 34; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) TEST_ERROR idx = 38; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0) TEST_ERROR idx = 42; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0) TEST_ERROR idx = 56; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -840,7 +840,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return(1); @@ -869,7 +869,6 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -888,13 +887,13 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records to fill root leaf node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC - 1); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -904,16 +903,16 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split root leaf node */ record = INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -922,20 +921,20 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert a couple more records, on the left side of the B-tree */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -944,17 +943,17 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -964,23 +963,23 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find non-existant record in level-1 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_SPLIT_ROOT_NREC + 10; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in root of level-1 B-tree */ idx = 33; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Attempt to find existant record in leaf of level-1 B-tree */ idx = 56; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Attempt to index non-existant record in level-1 B-tree */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -988,21 +987,21 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-1 B-tree */ idx = 33; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in left leaf of level-1 B-tree */ idx = 0; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in right leaf of level-1 B-tree */ idx = 50; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1016,7 +1015,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1046,7 +1045,6 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1063,13 +1061,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC/2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1079,18 +1077,18 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)INSERT_SPLIT_ROOT_NREC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1100,11 +1098,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1116,13 +1114,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistribute 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1132,17 +1130,17 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1152,11 +1150,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1171,7 +1169,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1201,7 +1199,6 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1218,13 +1215,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1234,17 +1231,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1254,14 +1251,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 31; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1273,13 +1270,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split side leaf into 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1289,17 +1286,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force right node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1309,14 +1306,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 62; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1331,7 +1328,7 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1363,7 +1360,6 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1381,13 +1377,13 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1397,17 +1393,17 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (2 * INSERT_SPLIT_ROOT_NREC); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1417,20 +1413,20 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to force middle node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1440,19 +1436,19 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 52; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 105; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1460,7 +1456,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1475,7 +1471,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1506,7 +1502,6 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1524,13 +1519,13 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 2); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1540,17 +1535,17 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force split from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1560,22 +1555,22 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 62; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 126; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1583,7 +1578,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1598,7 +1593,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1625,7 +1620,6 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1644,18 +1638,18 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 9); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + 1); u++) { record = u + 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1665,37 +1659,37 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 948; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to left-most leaf */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record = (INSERT_SPLIT_ROOT_NREC * 9) + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = (INSERT_SPLIT_ROOT_NREC * 9) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1705,43 +1699,43 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find non-existant record in level-2 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_SPLIT_ROOT_NREC * 30; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ idx = 948; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 948; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ idx = 505; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 505; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ idx = 555; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -1749,21 +1743,21 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ idx = 948; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in internal node of level-2 B-tree */ idx = 505; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in leaf of level-2 B-tree */ idx = 555; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1778,7 +1772,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1807,7 +1801,6 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1825,19 +1818,19 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* And fill rightmost leaf */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) { record = u + (INSERT_SPLIT_ROOT_NREC / 2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) { record = u + INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1847,22 +1840,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1859; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1921; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to force redistribution of rightmost leaf */ record = u + INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -1871,13 +1864,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1875; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1922; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -1885,7 +1878,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistrib left-most leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -1894,13 +1887,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 32; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add more records to left-most leaf, to force a 2->1 split and then a @@ -1908,7 +1901,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1918,13 +1911,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 47; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -1932,7 +1925,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistrib middle leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -1941,22 +1934,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */ + if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */ TEST_ERROR record = 535; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ TEST_ERROR record = 630; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ TEST_ERROR record = 568; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ TEST_ERROR /* Add more records to middle leaf, to force a split and a 3 node redistribution on middle leaf */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 8) + (INSERT_SPLIT_ROOT_NREC / 2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1966,25 +1959,25 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */ + if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */ TEST_ERROR record = 524; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ TEST_ERROR record = 577; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ TEST_ERROR record = 568; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1992,7 +1985,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2007,7 +2000,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2036,7 +2029,6 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2054,18 +2046,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) { record = u + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2075,23 +2067,23 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1797; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1859; /* Right-most record in right-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert enough records to force right-most leaf to split */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2101,16 +2093,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1828; /* Next-to-right-most record in right-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1860; /* Right-most record in right-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1891; /* Right-most record in right-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2118,7 +2110,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split left-most leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2127,18 +2119,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 63; /* Left-most record in left-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1; /* Left-most record in left-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add another record to left-most leaf, to force a 1->2 node split on left leaf */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2147,16 +2139,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 63; /* Left-most record in left-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 32; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2164,7 +2156,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split middle leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2173,21 +2165,21 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 504; /* Record in internal node just before insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 568; /* Record in internal node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 506; /* Record in leaf node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add another record to middle leaf, to force a node split on middle leaf */ record = (INSERT_SPLIT_ROOT_NREC * 8) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2196,28 +2188,28 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 504; /* Left-most record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 537; /* Middle record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 568; /* Right-most record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 506; /* Record in leaf node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2225,7 +2217,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2240,7 +2232,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2270,7 +2262,6 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2288,14 +2279,14 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* And fill up right internal node, to just before to redistribute it */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 44); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2305,22 +2296,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1318; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3114; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3145; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to redistribute right-most internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2329,13 +2320,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1822; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3114; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3146; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2343,7 +2334,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redist. 2 internal (l->r) in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2352,19 +2343,19 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1822; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 436; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 374; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Force left-most internal node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 6) - 4); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2374,22 +2365,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1570; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 61; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2397,7 +2388,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2412,7 +2403,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2442,7 +2433,6 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2460,14 +2450,14 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* (And fill up two child internal nodes) */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 59); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2477,22 +2467,22 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 4555; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 4586; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split right-most internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2501,16 +2491,16 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3704; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 4555; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 4387; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2518,7 +2508,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split side internal node to 2 in level 2 B-tree (l->2)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2527,19 +2517,19 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 932; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 870; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Force left-most internal node to split */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2549,25 +2539,25 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 870; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1814; /* Next-to-left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 61; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2575,7 +2565,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2590,7 +2580,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2621,7 +2611,6 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2639,18 +2628,18 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 3 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 36); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2660,29 +2649,29 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2267; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3199; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3137; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to fill up middle internal node */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 36); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2692,28 +2681,28 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3104; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3137; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3135; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert another record, forcing the middle internal node to redistribute */ record = u + (INSERT_SPLIT_ROOT_NREC * 36); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2722,30 +2711,30 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1574; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3104; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR #ifdef NONE record = 2862; /* Record to left of insertion point in right internal node (now) */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR #endif /* NONE */ record = 3137; /* Record to right of insertion point in right internal node (now) */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3135; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2753,7 +2742,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2768,7 +2757,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2799,7 +2788,6 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2817,24 +2805,24 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 3 internal nodes */ /* (and fill right internal node) */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 31); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC * 74); u++) { record = u + ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2843,25 +2831,25 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1952; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2884; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2822; /* Record just after insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Insert records to fill up middle internal node */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 31); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2871,28 +2859,28 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2789; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2822; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2823; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split middle internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 31); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2901,33 +2889,33 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2789; /* Middle record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR #ifdef NONE record = 3049; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR #endif /* NONE */ record = 2822; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2823; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2935,7 +2923,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2950,7 +2938,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2979,7 +2967,6 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, hid_t file = -1; /* File ID */ char filename[1024]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -3038,13 +3025,13 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3055,7 +3042,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3076,7 +3063,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Check up on B-tree after re-open */ @@ -3087,7 +3074,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3097,7 +3084,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Attempt to find non-existant record in level-4 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_MANY * 2; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Find random records */ @@ -3106,19 +3093,19 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); idx = (hsize_t)(HDrandom()%INSERT_MANY); /* Attempt to find existant record in root of level-4 B-tree */ - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR } /* end for */ /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3131,12 +3118,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Attempt to find existant record in root of level-4 B-tree */ /* (in increasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, idx, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to find existant record in root of level-4 B-tree */ /* (in decreasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3145,12 +3132,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TESTING("B-tree insert: attempt duplicate record in level 4 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = INSERT_MANY / 2; H5E_BEGIN_TRY { - ret = H5B2_insert(bt2, dxpl, &record); + ret = H5B2_insert(bt2, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3165,7 +3152,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3182,7 +3169,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -3209,7 +3196,6 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3222,7 +3208,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* @@ -3231,47 +3217,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: inserting first record in empty B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record.key = 42; record.val = 72; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &find, NULL, NULL) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ find.key = 42; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != 72) TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &find, NULL, NULL) != TRUE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3279,7 +3265,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ find.key = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 42) TEST_ERROR @@ -3295,47 +3281,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: update only record in B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR modify.key = 42; modify.val = 43; - if(H5B2_update(bt2, dxpl, &modify, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &modify, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &find, NULL, NULL) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find modified record in B-tree with 1 record */ find.key = 42; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != 43) TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &find, NULL, NULL) != TRUE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3344,7 +3330,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 42) TEST_ERROR @@ -3360,7 +3346,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: insert several records"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* @@ -3368,7 +3354,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 34; record.val = 11; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* @@ -3376,7 +3362,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 56; record.val = 12; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* @@ -3384,28 +3370,28 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 38; record.val = 13; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several records */ find.key = 56; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) TEST_ERROR if(find.val != 12) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3414,7 +3400,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 34) TEST_ERROR @@ -3422,7 +3408,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 38) TEST_ERROR @@ -3430,7 +3416,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 42) TEST_ERROR @@ -3438,7 +3424,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 56) TEST_ERROR @@ -3456,43 +3442,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, record.key = 34; modify.key = 34; modify.val = 21; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 38; modify.key = 38; modify.val = 23; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 42; modify.key = 42; modify.val = 24; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 56; modify.key = 56; modify.val = 22; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ find.key = 41; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ find.key = 56; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) TEST_ERROR if(find.val != 22) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3501,7 +3487,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 34) TEST_ERROR @@ -3509,7 +3495,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 38) TEST_ERROR @@ -3517,7 +3503,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 42) TEST_ERROR @@ -3525,7 +3511,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 56) TEST_ERROR @@ -3533,7 +3519,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3550,7 +3536,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return(1); @@ -3579,7 +3565,6 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3600,14 +3585,14 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records to fill root leaf node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC - 1); u++) { record.key = u + 2; record.val = u * 2 + 4; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3617,17 +3602,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split root leaf node */ record.key = INSERT_SPLIT_ROOT_NREC_REC + 1; record.val = (INSERT_SPLIT_ROOT_NREC_REC - 1) * 2 + 4; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -3636,13 +3621,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 2; idx.val = 4; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3650,7 +3635,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Modify all records */ @@ -3658,7 +3643,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, record.key = u + 2; modify.key = u + 2; modify.val = u * 2 + 5; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3668,13 +3653,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 2; idx.val = 5; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3683,17 +3668,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert a couple more records, on the left side of the B-tree */ record.key = 0; record.val = 1; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = 3; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -3702,18 +3687,18 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 1; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3724,7 +3709,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = 800; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -3732,7 +3717,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-1 B-tree */ find.key = 33; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.key != 33) TEST_ERROR @@ -3742,7 +3727,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in leaf of level-1 B-tree */ find.key = 56; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.key != 56) TEST_ERROR @@ -3751,7 +3736,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index non-existant record in level-1 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3760,7 +3745,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 33) TEST_ERROR @@ -3770,7 +3755,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in left leaf of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 0) TEST_ERROR @@ -3780,7 +3765,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in right leaf of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 50) TEST_ERROR @@ -3788,7 +3773,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3802,7 +3787,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -3832,7 +3817,6 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3849,14 +3833,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; record.val = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3866,11 +3850,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR @@ -3878,7 +3862,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) { record.key = u; record.val = u + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3888,11 +3872,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3904,14 +3888,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3921,18 +3905,18 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3942,11 +3926,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3961,7 +3945,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -3991,7 +3975,6 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4008,14 +3991,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4025,18 +4008,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4046,14 +4029,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 31; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 64; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4065,14 +4048,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4082,18 +4065,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force right node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4103,14 +4086,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 95; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4125,7 +4108,7 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4157,7 +4140,6 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4175,14 +4157,14 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4192,18 +4174,18 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4213,21 +4195,21 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to force middle node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4237,20 +4219,20 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 52; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 107; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4258,7 +4240,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4273,7 +4255,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4304,7 +4286,6 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4322,14 +4303,14 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC * 2); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4339,18 +4320,18 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force split from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 2); u++) { record.key = u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4360,23 +4341,23 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 95; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 128; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4384,7 +4365,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4399,7 +4380,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4426,7 +4407,6 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4446,20 +4426,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = u + 2; /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = u + 4; /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4469,42 +4449,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1347; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to left-most leaf */ record.key = 0; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4515,7 +4495,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4523,45 +4503,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1347; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1347 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1347; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (513 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 513; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4570,7 +4550,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1347) TEST_ERROR @@ -4580,7 +4560,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 513) TEST_ERROR @@ -4590,7 +4570,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4598,7 +4578,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4611,20 +4591,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: make level 2 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - (u +2); /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4634,42 +4614,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1344; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to right-most leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4680,7 +4660,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4688,45 +4668,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1344; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1344 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1344; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 512; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (512 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 512; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4735,7 +4715,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1344) TEST_ERROR @@ -4745,7 +4725,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 512) TEST_ERROR @@ -4755,7 +4735,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4763,7 +4743,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4776,20 +4756,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: make level 2 B-tree (l+r->middle)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 3) - u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = u - ((INSERT_SPLIT_ROOT_NREC_REC * 9) - 2); /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4799,52 +4779,52 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1345; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to right-most leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 4; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 5; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to left-most leaf */ record.key = 0; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4855,7 +4835,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4863,45 +4843,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1345; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1345 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1345; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (513 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 513; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4910,7 +4890,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1345) TEST_ERROR @@ -4920,7 +4900,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 513) TEST_ERROR @@ -4930,7 +4910,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4938,7 +4918,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4953,7 +4933,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4980,7 +4960,6 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ time_t curr_time; /* Current time, for seeding random number generator */ @@ -5033,13 +5012,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY_REC; u++) { record = records[u]; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -5050,7 +5029,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5064,7 +5043,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Check up on B-tree after re-open */ @@ -5076,7 +5055,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Iterate over B-tree to check records have been inserted correctly */ iter.key = 0; iter.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &iter) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &iter) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -5087,7 +5066,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* (Should not be found, but not fail) */ find.key = INSERT_MANY_REC * 2; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -5099,7 +5078,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); find.val = (hsize_t)-1; /* Attempt to find existant record in level-4 B-tree */ - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (find.key * 2)) TEST_ERROR @@ -5107,13 +5086,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5132,7 +5111,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to find existant record in level-4 B-tree */ /* (in increasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, idx, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != idx) TEST_ERROR @@ -5145,7 +5124,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to find existant record in level-4 B-tree */ /* (in decreasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_DEC, idx, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != (INSERT_MANY_REC - (idx + 1))) TEST_ERROR @@ -5158,13 +5137,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TESTING("B-tree update: update record in level 4 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record.key = INSERT_MANY_REC / 2; modify.key = INSERT_MANY_REC / 2; modify.val = record.key * 3; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5176,7 +5155,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5194,7 +5173,7 @@ error: HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -5222,7 +5201,6 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5239,7 +5217,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5253,7 +5231,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a record from a B-tree with no records */ record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5264,12 +5242,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: non-existant record from 1 record B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert one record into B-tree */ record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5281,7 +5259,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5291,7 +5269,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a non-existant record from a B-tree with 1 record */ record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5303,12 +5281,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: existant record from 1 record B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5324,7 +5302,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has been freed */ @@ -5337,21 +5315,21 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: adding records to B-tree after removal"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert several records into B-tree again */ record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 34; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 56; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 38; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5368,12 +5346,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: non-existant record from level-0 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5385,12 +5363,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: mult. existant records from level-0 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5406,7 +5384,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5415,7 +5393,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 34; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5431,7 +5409,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5440,7 +5418,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 56; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5456,7 +5434,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5465,7 +5443,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 38; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5481,7 +5459,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has been freed */ @@ -5489,7 +5467,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5504,7 +5482,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5530,7 +5508,6 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5548,13 +5525,13 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -5567,7 +5544,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5577,7 +5554,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a non-existant record from a B-tree with 1 record */ record = (INSERT_SPLIT_ROOT_NREC * 2) + 1; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5597,22 +5574,22 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from right leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC * 2) - 2; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5621,10 +5598,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5641,16 +5618,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from left leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = 0; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 1; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5659,10 +5636,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5679,16 +5656,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from middle leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = INSERT_SPLIT_ROOT_NREC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5697,10 +5674,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5712,7 +5689,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5727,7 +5704,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5753,7 +5730,6 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5770,22 +5746,22 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5797,7 +5773,7 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5805,14 +5781,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */ for(u = 0; u < 8; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5830,10 +5806,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 90; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR PASSED(); @@ -5842,13 +5818,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: redistribute 2 leaves in level-1 B-tree (l->r)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR for(u = 0; u < 39; u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5866,10 +5842,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 64; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 90; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR PASSED(); @@ -5878,13 +5854,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: redistribute 3 leaves in level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR for(u = 0; u < 2; u++) { record = INSERT_SPLIT_ROOT_NREC + 2 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5902,14 +5878,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 64; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 91; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5924,7 +5900,7 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5950,7 +5926,6 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5967,24 +5942,24 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5996,7 +5971,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6004,14 +5979,14 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6031,7 +6006,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 62; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR PASSED(); @@ -6040,31 +6015,31 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: merge 2 leaves to 1 in level-1 B-tree (l->r)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Fill B-tree back up */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Remove records */ for(u = 0; u < ((3 * INSERT_SPLIT_ROOT_NREC) / 4) - 1; u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6084,11 +6059,11 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 94; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6103,7 +6078,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6129,7 +6104,6 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6146,24 +6120,24 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6175,7 +6149,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6183,14 +6157,14 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from middle leaf of a level-1 B-tree to force merge */ for(u = 0; u < ((5 * INSERT_SPLIT_ROOT_NREC) / 6) - 1; u++) { record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6210,11 +6184,11 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 37; /* Only record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6229,7 +6203,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6255,7 +6229,6 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6272,30 +6245,30 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 5 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 4); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 220; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6307,7 +6280,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6315,13 +6288,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ record = 220; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6330,18 +6303,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6362,12 +6335,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from left leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6376,18 +6349,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 63; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6404,12 +6377,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from middle leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 125; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6418,18 +6391,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 63; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 126; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6441,7 +6414,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6456,7 +6429,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6482,7 +6455,6 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6499,24 +6471,24 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6528,7 +6500,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6536,7 +6508,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ @@ -6545,7 +6517,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar for(u = 0; u < 7; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6563,7 +6535,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar record = 94; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6572,12 +6544,12 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 90; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6589,7 +6561,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6604,7 +6576,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6630,7 +6602,6 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6647,24 +6618,24 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6676,7 +6647,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6684,7 +6655,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */ @@ -6693,7 +6664,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar for(u = 0; u < 7; u++) { record = 63 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6711,7 +6682,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6720,12 +6691,12 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar /* Check record values in root of B-tree */ record = 39; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 86; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6737,7 +6708,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6752,7 +6723,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6778,7 +6749,6 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6795,24 +6765,24 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6824,7 +6794,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6832,7 +6802,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ @@ -6841,7 +6811,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < 14; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6859,7 +6829,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, record = 87; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6870,7 +6840,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 62; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6882,7 +6852,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6897,7 +6867,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6923,7 +6893,6 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6940,24 +6909,24 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6969,7 +6938,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6977,7 +6946,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */ @@ -6986,7 +6955,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < 50; u++) { record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7004,7 +6973,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, record = 25; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7015,7 +6984,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 37; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7027,7 +6996,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7042,7 +7011,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7068,7 +7037,6 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7085,13 +7053,13 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -7099,7 +7067,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 31; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7111,7 +7079,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7119,14 +7087,14 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from B-tree to force a single leaf for the B-tree */ for(u = 0; u < 14; u++) { record = INSERT_SPLIT_ROOT_NREC - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7146,7 +7114,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 0; ninfo.nrec = (uint16_t)(INSERT_SPLIT_ROOT_NREC - u); record = 31; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7158,7 +7126,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7166,7 +7134,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7181,7 +7149,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7207,7 +7175,6 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7224,24 +7191,24 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7253,7 +7220,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7261,20 +7228,20 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in right internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 2960; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion */ record = 2960; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7285,7 +7252,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 2961; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7302,19 +7269,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from left internal of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in left internal node */ ninfo.depth = 1; ninfo.nrec = 29; record = 1133; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 1133; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7325,7 +7292,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 29; record = 1134; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7342,19 +7309,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from middle internal of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in middle internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 2267; /* Record in middle internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 2267; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7365,7 +7332,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 2268; /* Record in middle internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7382,19 +7349,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote record from root of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in root node */ ninfo.depth = 2; ninfo.nrec = 2; record = 1889; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 1889; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7405,7 +7372,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 2; record = 1890; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7417,19 +7384,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in root node */ ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 2834; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7440,7 +7407,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 2; record = 2835; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7452,7 +7419,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7467,7 +7434,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7493,7 +7460,6 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7510,24 +7476,24 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7539,7 +7505,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7547,21 +7513,21 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 14; record = 3685; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 8; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7579,7 +7545,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * record = 3685; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7590,7 +7556,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * ninfo.depth = 1; ninfo.nrec = 14; record = 3681; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7602,7 +7568,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7617,7 +7583,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7643,7 +7609,6 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7660,24 +7625,24 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7689,7 +7654,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7697,21 +7662,21 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 62; /* Left-most record in left node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 38; u++) { record = 63 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7729,7 +7694,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7740,7 +7705,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * ninfo.depth = 1; ninfo.nrec = 29; record = 49; /* Left-most record in left node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7752,7 +7717,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7767,7 +7732,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7793,7 +7758,6 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7810,24 +7774,24 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7839,7 +7803,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7847,21 +7811,21 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in right internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 3685; /* Right-most record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 15; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7880,7 +7844,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar /* Force merge by promoting current right-most record */ record = 3678; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7891,7 +7855,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar ninfo.depth = 1; ninfo.nrec = 13; record = 3653; /* Right-most record in right internal node (now) */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7903,7 +7867,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7918,7 +7882,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7944,7 +7908,6 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7961,24 +7924,24 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7990,7 +7953,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7998,21 +7961,21 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in left internal node */ ninfo.depth = 1; ninfo.nrec = 29; record = 62; /* Left-most record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 112; u++) { record = 48 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8031,7 +7994,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar /* Force merge of left-most internal nodes by promotion */ record = 25; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8042,7 +8005,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar ninfo.depth = 1; ninfo.nrec = 28; record = 37; /* Left-most record in left internal node (now) */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8054,7 +8017,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8069,7 +8032,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8095,7 +8058,6 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8112,24 +8074,24 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8141,7 +8103,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8149,14 +8111,14 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 21) + 15); u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8176,11 +8138,11 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 2834; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8195,7 +8157,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8221,7 +8183,6 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8238,24 +8199,24 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8267,7 +8228,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8275,14 +8236,14 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 5) + 17); u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8302,11 +8263,11 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam ninfo.depth = 2; ninfo.nrec = 1; record = 1889; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8321,7 +8282,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8347,7 +8308,6 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8364,24 +8324,24 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8393,7 +8353,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8401,14 +8361,14 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from middle internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 23) + 15); u++) { record = (INSERT_SPLIT_ROOT_NREC * 20) + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8428,11 +8388,11 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 1196; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8447,7 +8407,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8473,7 +8433,6 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8491,24 +8450,24 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8520,7 +8479,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8528,14 +8487,14 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force back to level-1 */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 34) + 17; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8558,7 +8517,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8573,7 +8532,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8599,7 +8558,6 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ hsize_t record; /* Record to insert into tree */ unsigned u; /* Local index variable */ @@ -8618,13 +8576,13 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -8635,7 +8593,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8648,7 +8606,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; @@ -8680,7 +8638,6 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara int fd = -1; /* File descriptor */ h5_stat_t sb; /* Stat buffer for file */ void *file_data = NULL; /* Copy of file data */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8784,14 +8741,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8808,7 +8765,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8816,7 +8773,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8868,7 +8825,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ @@ -8878,7 +8835,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); rrecord = HSIZET_MAX; /* Remove random record */ - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8895,7 +8852,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8903,7 +8860,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8956,14 +8913,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { /* Remove first record */ rrecord = HSIZET_MAX; - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8980,7 +8937,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8988,7 +8945,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9041,14 +8998,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { /* Remove last record */ rrecord = HSIZET_MAX; - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -9065,7 +9022,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -9073,7 +9030,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9093,7 +9050,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; @@ -9128,7 +9085,6 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9156,45 +9112,45 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < FIND_NEIGHBOR; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Attempt to find record B-tree less than a value */ search = 0; H5E_BEGIN_TRY { - ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record); + ret = H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR search = 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 0) TEST_ERROR search = 2; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 0) TEST_ERROR search = 3; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 4; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR @@ -9203,12 +9159,12 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 250; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in internal node */ search = 251; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 250) TEST_ERROR @@ -9217,18 +9173,18 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 1888; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in root node */ search = 1889; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 1888) TEST_ERROR search = (FIND_NEIGHBOR * 2) + 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != ((FIND_NEIGHBOR - 1) * 2)) TEST_ERROR @@ -9241,38 +9197,38 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree find: nearest neighbor greater than a value"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to find record B-tree less than a value */ search = (FIND_NEIGHBOR * 2) + 1; H5E_BEGIN_TRY { - ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record); + ret = H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR search = 0; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 2; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 4) TEST_ERROR search = 3; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 4) TEST_ERROR @@ -9281,31 +9237,31 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 16; record = 2896; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in internal node */ search = 2895; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2896) TEST_ERROR /* Neighbor is in root node */ search = 1887; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 1888) TEST_ERROR search = ((FIND_NEIGHBOR - 1) * 2) - 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != ((FIND_NEIGHBOR - 1) * 2)) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9322,7 +9278,7 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -9352,7 +9308,6 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) H5F_t *f = NULL; /* Internal file object pointer */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9391,18 +9346,18 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close the file */ @@ -9435,13 +9390,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_SMALL; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9452,14 +9407,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, H5AC_ind_read_dxpl_id, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9492,13 +9447,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_MEDIUM; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9509,14 +9464,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9549,13 +9504,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_LARGE; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9566,14 +9521,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9595,7 +9550,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -9622,7 +9577,6 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9643,13 +9597,13 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u * 5; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9663,7 +9617,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 3; modify = 4; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9674,33 +9628,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in leaf node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 0; ninfo.nrec = 62; record = 4330; /* Record in leaf node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in a leaf node */ record = 4330; modify = 4331; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 0; ninfo.nrec = 62; record = 4331; /* Record in leaf node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 4331; found = 4331; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) FAIL_STACK_ERROR if(found != 4331) TEST_ERROR @@ -9709,7 +9663,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 4330; found = HSIZET_MAX; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9720,33 +9674,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in internal node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 5350; /* Record in internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in an internal node */ record = 5350; modify = 5352; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 5352; /* Record in internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 5352; found = 5352; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) STACK_ERROR if(found != 5352) TEST_ERROR @@ -9755,7 +9709,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 5350; found = 5350; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9766,33 +9720,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in root node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 2; ninfo.nrec = 2; record = 9445; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in a root node */ record = 9445; modify = 9448; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 2; ninfo.nrec = 2; record = 9448; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 9448; found = 9448; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) STACK_ERROR if(found != 9448) TEST_ERROR @@ -9801,14 +9755,14 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 9445; found = 9445; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9823,7 +9777,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -9856,7 +9810,6 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) hid_t file00 = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ H5F_t *f2 = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ @@ -9881,15 +9834,15 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2_2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2_2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Close the second v2 B-tree wrapper */ - if(H5B2_close(bt2_2, dxpl) < 0) + if(H5B2_close(bt2_2) < 0) FAIL_STACK_ERROR bt2_2 = NULL; @@ -9901,7 +9854,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Close the first v2 B-tree wrapper */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9931,7 +9884,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Open the B-tree through the second file handle */ - if(NULL == (bt2_2 = H5B2_open(f2, dxpl, bt2_addr, f2))) + if(NULL == (bt2_2 = H5B2_open(f2, bt2_addr, f2))) FAIL_STACK_ERROR /* Close the extra file handles */ @@ -9941,7 +9894,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Close the second v2 B-tree */ - if(H5B2_close(bt2_2, dxpl) < 0) + if(H5B2_close(bt2_2) < 0) FAIL_STACK_ERROR bt2_2 = NULL; @@ -9958,9 +9911,9 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); if(bt2) - H5B2_close(bt2_2, dxpl); + H5B2_close(bt2_2); H5Fclose(file); H5Fclose(file2); H5Fclose(file0); @@ -9994,6 +9947,7 @@ main(void) unsigned reopen; /* Whether to reopen B-tree during tests */ int ExpressMode; const char *envval = NULL; + hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ envval = HDgetenv("HDF5_DRIVER"); if(envval == NULL) @@ -10009,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) { @@ -10097,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; @@ -10113,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 97a1b91..d5e3c6c 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3309,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) { @@ -3320,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) { @@ -3331,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) { @@ -3343,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) { @@ -5014,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) { @@ -5088,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) { @@ -5245,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) { @@ -5319,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) { @@ -9322,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) { @@ -9514,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) { @@ -10793,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) { @@ -12522,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) { @@ -12581,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) { @@ -12714,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) { @@ -12789,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) { @@ -14351,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) { @@ -14436,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) { @@ -14796,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) { @@ -14883,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) { @@ -15956,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"; @@ -15965,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"; @@ -16032,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 */ @@ -16122,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 */ @@ -16215,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); @@ -16301,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) { @@ -16387,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) { @@ -16591,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); @@ -16673,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) { @@ -16841,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) { @@ -16859,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) { @@ -16877,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) { @@ -17174,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) { @@ -17216,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) { @@ -17303,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); @@ -17398,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) || @@ -17443,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 */ @@ -31018,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 @@ -31124,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 @@ -31236,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 @@ -31355,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 @@ -31531,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 @@ -31741,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 @@ -31899,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 @@ -32033,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 @@ -32226,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 @@ -32465,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 @@ -32722,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 @@ -33009,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 @@ -33325,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 @@ -34663,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) { @@ -35015,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) { @@ -35451,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) { @@ -35838,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) { @@ -36311,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) { diff --git a/test/cache_common.c b/test/cache_common.c index cadccec..2cc188e 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -17,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" @@ -129,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); @@ -212,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, @@ -1123,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, @@ -1208,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, @@ -1216,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, @@ -1230,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, @@ -1244,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, @@ -1258,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, @@ -1272,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, @@ -1286,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, @@ -1300,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, @@ -1314,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, @@ -1328,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, @@ -1342,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, @@ -1356,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); } @@ -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 ) && @@ -6432,7 +6413,7 @@ validate_mdc_config(hid_t file_id, * the supplied external configuration. * * The cache also sets the initial_size field to the current - * cache max size instead of the value initialy supplied. + * cache max size instead of the value initially supplied. * Depending on circumstances, this may or may not match * the original. Hence the compare_init parameter. */ diff --git a/test/cache_common.h b/test/cache_common.h index 8999e44..9c66357 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -180,7 +180,7 @@ typedef struct flush_op hbool_t flag; /* boolean flag passed into the * function implementing the flush * operation. The meaning of the - * flag is dependant upon the flush + * flag is dependent upon the flush * operation: * * FLUSH_OP__DIRTY: TRUE iff the diff --git a/test/cache_image.c b/test/cache_image.c index 58b0b8f..5967ecc 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -511,7 +511,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset) * FAPL entry when opening the file, and verify that the * metadata cache is notified. * - * If config_fsm is TRUE, setup the persistant free space + * If config_fsm is TRUE, setup the persistent free space * manager. Note that this flag may only be set if * create_file is also TRUE. * @@ -654,7 +654,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - /* setup the persistant free space manager if indicated */ + /* setup the persistent free space manager if indicated */ if ( ( pass ) && ( config_fsm ) ) { fcpl_id = H5Pcreate(H5P_FILE_CREATE); @@ -5149,9 +5149,9 @@ cache_image_smoke_check_5(void) * 13) Close the file. * * 14) Get the size of the file. Verify that it is less - * than 20 KB. Without deletions and persistant free + * than 20 KB. Without deletions and persistent free * space managers, size size is about 167 MB, so this - * is sufficient to verify that the persistant free + * is sufficient to verify that the persistent free * space managers are more or less doing their job. * * Note that in the absence of paged allocation, file @@ -5473,9 +5473,9 @@ cache_image_smoke_check_6(void) /* 14) Get the size of the file. Verify that it is less - * than 20 KB. Without deletions and persistant free + * than 20 KB. Without deletions and persistent free * space managers, size size is about 167 MB, so this - * is sufficient to verify that the persistant free + * is sufficient to verify that the persistent free * space managers are more or less doing their job. * * Note that in the absence of paged allocation, file @@ -7160,7 +7160,7 @@ cache_image_api_error_check_4(void) * called before any activity on the metadata cache. * This is a potential problem, as satisfying the * H5Fget_free_sections() call requires access to all - * free space managers. When persistant free space + * free space managers. When persistent free space * managers are enabled, this will require calling * H5MF_tidy_self_referential_fsm_hack(). This is a * non issue in the absence of a cache image. However, @@ -7179,7 +7179,7 @@ cache_image_api_error_check_4(void) * The test is set up as follows: * * 1) Create a HDF5 file with a cache image requested - * and persistant free space managers enabled. + * and persistent free space managers enabled. * * 2) Create some data sets, and then delete some of * of those near the beginning of the file. @@ -7273,7 +7273,7 @@ get_free_sections_test(void) /* 1) Create a HDF5 file with a cache image requested - * and persistant free space managers enabled. + * and persistent free space managers enabled. */ if ( pass ) { @@ -7666,13 +7666,13 @@ get_free_sections_test(void) * the dirty metadata, the second scan will fail, as valid * versions of the dirty metadata will not be available. * - * To make the test more useful, enable persistant free + * To make the test more useful, enable persistent free * space managers. * * The test is set up as follows: * * 1) Create a HDF5 file without a cache image requested - * and persistant free space managers enabled. + * and persistent free space managers enabled. * * 2) Create some data sets and verify them. * @@ -7753,7 +7753,7 @@ evict_on_close_test(void) /* 1) Create a HDF5 file without a cache image requested - * and persistant free space managers enabled. + * and persistent free space managers enabled. */ if ( pass ) { diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 9c79968..119ba62 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -22,6 +22,7 @@ #include "testhdf5.h" #include "cache_common.h" +#include "H5CXprivate.h" /* API Contexts */ #include "H5HLprivate.h" /* ============ */ @@ -349,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; @@ -376,7 +377,7 @@ get_object_header_tag(hid_t loc_id, haddr_t *tag) H5O_info_t oinfo; /* Object info */ /* Retrieve the info for the object */ - if(H5Oget_info(loc_id, &oinfo) < 0) + if(H5Oget_info2(loc_id, &oinfo, H5O_INFO_ALL) < 0) TEST_ERROR; /* Set the tag to return */ @@ -1513,7 +1514,7 @@ check_attribute_rename_tags(hid_t fcpl, int type) haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */ - hbool_t persistant_fsms = FALSE; + hbool_t persistent_fsms = FALSE; /* Testing Macro */ TESTING("tag application during attribute renaming"); @@ -1522,8 +1523,8 @@ check_attribute_rename_tags(hid_t fcpl, int type) /* Setup */ /* ===== */ - /* check to see if the FCPL specified persistant free space managers */ - if(H5Pget_file_space_strategy(fcpl, NULL, &persistant_fsms, NULL) < 0) + /* check to see if the FCPL specified persistent free space managers */ + if(H5Pget_file_space_strategy(fcpl, NULL, &persistent_fsms, NULL) < 0) TEST_ERROR; /* Allocate array */ @@ -1620,14 +1621,14 @@ check_attribute_rename_tags(hid_t fcpl, int type) */ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; - /* If the free space managers are persistant, the + /* If the free space managers are persistent, the * H5MF_tidy_self_referential_fsm_hack() must have been run. * Since this function floats all self referential free space * managers, the H5FD_MEM_SUPER FSM will not be in the metadata * cache. */ - if(!persistant_fsms && verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; - if(!persistant_fsms && verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; + if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; + if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; /* verify btree header and leaf node belonging to group */ if ( verify_tag(fid, H5AC_BT2_HDR_ID, g_tag) < 0 ) TEST_ERROR; @@ -1692,7 +1693,7 @@ check_attribute_delete_tags(hid_t fcpl, int type) haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */ - hbool_t persistant_fsms = FALSE; + hbool_t persistent_fsms = FALSE; /* Testing Macro */ TESTING("tag application during attribute delete"); @@ -1701,8 +1702,8 @@ check_attribute_delete_tags(hid_t fcpl, int type) /* Setup */ /* ===== */ - /* check to see if the FCPL specified persistant free space managers */ - if ( H5Pget_file_space_strategy(fcpl, NULL, &persistant_fsms, NULL) < 0 ) + /* check to see if the FCPL specified persistent free space managers */ + if ( H5Pget_file_space_strategy(fcpl, NULL, &persistent_fsms, NULL) < 0 ) TEST_ERROR; /* Allocate array */ @@ -1780,13 +1781,13 @@ check_attribute_delete_tags(hid_t fcpl, int type) TEST_ERROR; #if 0 - /* If the free space managers are persistant, the + /* If the free space managers are persistent, the * H5MF_tidy_self_referential_fsm_hack() must have been run. * Since this function floats all self referential free space * managers, the H5FD_MEM_SUPER FSM will not be in the metadata * cache. */ - if ( ( ! persistant_fsms ) && + if ( ( ! persistent_fsms ) && ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) ) TEST_ERROR; #endif @@ -2936,7 +2937,7 @@ check_object_info_tags(void) /* Get information on an object by name */ /* ===================================== */ - if ( H5Oget_info_by_name(fid, GROUPNAME, &oinfo, H5P_DEFAULT) < 0 ) TEST_ERROR; + if ( H5Oget_info_by_name2(fid, GROUPNAME, &oinfo, H5O_INFO_ALL, H5P_DEFAULT) < 0 ) TEST_ERROR; /* =================================== */ /* Verification of Metadata Tag Values */ @@ -3635,9 +3636,9 @@ check_invalid_tag_application(void) /* Variables */ H5F_t * f = NULL; hid_t fid = -1; - hid_t dxpl_id = -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 */ @@ -3647,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; @@ -3692,6 +3698,10 @@ check_invalid_tag_application(void) 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 */ diff --git a/test/cork.c b/test/cork.c index 8c685ee..dceaf5a 100644 --- a/test/cork.c +++ b/test/cork.c @@ -126,7 +126,7 @@ verify_old_dset_cork(void) TEST_ERROR /* Get dataset object header address: DSET_BT1 */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_BT1 */ @@ -163,7 +163,7 @@ verify_old_dset_cork(void) FAIL_STACK_ERROR /* Get dataset object address */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_COMPACT */ @@ -216,7 +216,7 @@ verify_old_dset_cork(void) FAIL_STACK_ERROR /* Get dataset object address: DSET_CONTIG */ - if(H5Oget_info(did3, &oinfo3) < 0) + if(H5Oget_info2(did3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_CONTIG */ @@ -329,7 +329,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Get dataset object header address */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the dataset: DSET */ @@ -372,7 +372,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Get dataset object header address */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_NONE */ @@ -546,7 +546,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_EA */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_EA */ @@ -564,7 +564,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_FA */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_FA */ @@ -591,7 +591,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_BT2 */ - if(H5Oget_info(did3, &oinfo3) < 0) + if(H5Oget_info2(did3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_BT2 */ @@ -770,11 +770,11 @@ verify_group_cork(hbool_t swmr) TEST_ERROR /* Get group object header addresses */ - if(H5Oget_info(gid, &oinfo) < 0) + if(H5Oget_info2(gid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gid2, &oinfo2) < 0) + if(H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gid3, &oinfo3) < 0) + if(H5Oget_info2(gid3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the groups */ @@ -959,11 +959,11 @@ verify_named_cork(hbool_t swmr) TEST_ERROR /* Get named datatype object header addresses */ - if(H5Oget_info(tid, &oinfo) < 0) + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(tid2, &oinfo2) < 0) + if(H5Oget_info2(tid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(tid3, &oinfo3) < 0) + if(H5Oget_info2(tid3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the named datatypes */ @@ -1063,7 +1063,7 @@ verify_named_cork(hbool_t swmr) FAIL_STACK_ERROR /* Get dataset object header address */ - if(H5Oget_info(did, &oinfo4) < 0) + if(H5Oget_info2(did, &oinfo4, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET */ @@ -1277,7 +1277,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the group: gid2 */ - if(H5Oget_info(gid2, &oinfo1) < 0) + if(H5Oget_info2(gid2, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo1.addr, TRUE) < 0) TEST_ERROR @@ -1305,7 +1305,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the dataset: did1 */ - if(H5Oget_info(did1, &oinfo2) < 0) + if(H5Oget_info2(did1, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid1, oinfo2.addr, TRUE) < 0) TEST_ERROR @@ -1333,7 +1333,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the datatype: tid2 */ - if(H5Oget_info(tid2, &oinfo3) < 0) + if(H5Oget_info2(tid2, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo3.addr, TRUE) < 0) TEST_ERROR @@ -1349,7 +1349,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the group: gid1 */ - if(H5Oget_info(gid1, &oinfo1) < 0) + if(H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid1, oinfo1.addr, FALSE) < 0) TEST_ERROR @@ -1383,7 +1383,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the dataset: did2 */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo2.addr, FALSE) < 0) TEST_ERROR diff --git a/test/direct_chunk.c b/test/direct_chunk.c new file mode 100644 index 0000000..2ef38ea --- /dev/null +++ b/test/direct_chunk.c @@ -0,0 +1,2167 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* 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. * +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "h5test.h" + +#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER) +# define H5_ZLIB_HEADER "zlib.h" +#endif +#if defined(H5_ZLIB_HEADER) +# include H5_ZLIB_HEADER /* "zlib.h" */ +#endif + +#define FILE_NAME "direct_chunk.h5" + +/* Datasets for Direct Write tests */ +#define DATASETNAME1 "direct_write" +#define DATASETNAME2 "skip_one_filter" +#define DATASETNAME3 "skip_two_filters" +#define DATASETNAME4 "data_conv" +#define DATASETNAME5 "contiguous_dset" +#define DATASETNAME6 "invalid_argue" +#define DATASETNAME7 "overwrite_chunk" +/* Datasets for Direct Read tests */ +#define DATASETNAME8 "disabled_chunk_cache" +#define DATASETNAME9 "flush_chunk_cache" +#define DATASETNAME10 "read_w_valid_cache" +#define DATASETNAME11 "unallocated_chunk" +#define DATASETNAME12 "unfiltered_data" + +#define RANK 2 +#define NX 16 +#define NY 16 +#define CHUNK_NX 4 +#define CHUNK_NY 4 + +#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*H5_DOUBLE(1.001))+H5_DOUBLE(12.0)) + +/* Temporary filter IDs used for testing */ +#define H5Z_FILTER_BOGUS1 305 +#define H5Z_FILTER_BOGUS2 306 +#define ADD_ON 7 +#define FACTOR 3 + +/* Constants for the overwrite test */ +#define OVERWRITE_NDIMS 3 +#define OVERWRITE_CHUNK_NX 3 +#define OVERWRITE_CHUNK_2NX 6 +#define OVERWRITE_CHUNK_NY 2 +#define OVERWRITE_VALUE 42 + +/* Defines used in test_single_chunk_latest() */ +#define FILE "single_latest.h5" +#define DATASET "dataset" +#define DIM0 4 +#define DIM1 32 +#define CHUNK0 DIM0 +#define CHUNK1 DIM1 + +/* Local prototypes for filter functions */ +static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); +static size_t filter_bogus2(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_BOGUS1[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_BOGUS1, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "bogus1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus1, /* The actual filter function */ +}}; + +const H5Z_class2_t H5Z_BOGUS2[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_BOGUS2, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "bogus2", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus2, /* The actual filter function */ +}}; + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_write + * + * Purpose: Test the basic functionality of H5Dwrite_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_write (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int ret; + int data[NX][NY]; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + const Bytef *z_src = (const Bytef*)(direct_buf); + Bytef *z_dst = NULL; /*destination buffer */ + uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + uLong z_src_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dwrite_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* + * Write the data for the dataset. It should stay in the chunk cache. + * It will be evicted from the cache by the H5Dwrite_chunk calls. + */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) + direct_buf[i][j] = n++; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_dst_nbytes); + z_dst = (Bytef *)outbuf; + + /* Perform compression from the source to the destination buffer */ + ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error"); + goto error; + } + + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf); + offset[1] += CHUNK_NY; + } + offset[0] += CHUNK_NX; + offset[1] = 0; + } + + if(outbuf) + HDfree(outbuf); + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for one chunk in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Reinitialize different data for one chunk */ + for(i = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) + direct_buf[i][j] = i + j; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_dst_nbytes); + z_dst = (Bytef *)outbuf; + + /* Perform compression from the source to the destination buffer */ + ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error"); + goto error; + } + + /* Rewrite the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ + offset[0] = offset[1] = 0; + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf); + offset[1] += CHUNK_NY; + } + offset[0] += CHUNK_NX; + offset[1] = 0; + } + + if(outbuf) + HDfree(outbuf); + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 2. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_write() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_overwrite_data + * + * Purpose: Test overwriting a chunk with new data. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Dana Robinson + * Spring 2017 + * + *------------------------------------------------------------------------- + */ +static int +test_direct_chunk_overwrite_data(hid_t fid) +{ + size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t); + int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + uint32_t filter_mask = 0; + hid_t tid = H5T_NATIVE_UINT16; + hid_t dcpl_id = -1; + hid_t sid = -1; + hid_t did = -1; + uint16_t fill_value = 0; + hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX}; + hsize_t offset[] = {0, 0, 0}; + hsize_t i, j; + int16_t n; + int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX]; + + TESTING("overwriting existing data with H5Dwrite_chunk"); + + /* Create the dataset's data space */ + if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0) + FAIL_STACK_ERROR + + /* Set chunk size and filll value */ + if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) + FAIL_STACK_ERROR + if (H5Pset_fill_value(dcpl_id, tid, &fill_value) < 0) + FAIL_STACK_ERROR + if (H5Pset_chunk(dcpl_id, OVERWRITE_NDIMS, chunk_dims) < 0) + FAIL_STACK_ERROR + + /* Create dataset */ + if ((did = H5Dcreate2(fid, DATASETNAME7, tid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Initialize data buffers */ + n = 0; + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) { + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + data_buf[i][j] = n++; + overwrite_buf[i][j] = OVERWRITE_VALUE; + } + } + + /* Write chunk data using the direct write function. */ + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Write second chunk. */ + offset[2] = OVERWRITE_CHUNK_NX; + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Overwrite first chunk. */ + offset[2] = 0; + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, overwrite_buf) < 0) + FAIL_STACK_ERROR + + /* Read the data back out */ + if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) + FAIL_STACK_ERROR + + /* Ensure that the data are correct in chunk 1 */ + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + if (read_buf[i][j] != OVERWRITE_VALUE) + TEST_ERROR + } + + if (H5Pclose(dcpl_id) < 0) + FAIL_STACK_ERROR + if (H5Sclose(sid) < 0) + FAIL_STACK_ERROR + if (H5Dclose(did) < 0) + FAIL_STACK_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Pclose(dcpl_id); + H5Sclose(sid); + H5Dclose(did); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* end test_direct_chunk_overwrite_data() */ + +/*------------------------------------------------------------------------- + * Function: test_skip_compress_write1 + * + * Purpose: Test skipping compression filter when it is the only filter + * for the dataset + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_skip_compress_write1(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + unsigned read_filter_mask = 0; /* filter mask after direct read */ + int read_direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t read_buf_size = 0; /* buf size */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("skipping compression filter for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + direct_buf[i][j] = n++; + } + + /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function. + * Indicate skipping the compression filter. */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + filter_mask = 0x00000001; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for the chunk just written in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size != buf_size) + goto error; + + /* Read the raw chunk back */ + HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf)); + if((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0) + goto error; + if(read_filter_mask != filter_mask) + goto error; + + /* Check that the direct chunk read is the same as the chunk written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != read_direct_buf[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_skip_compress_write1() */ + +/*------------------------------------------------------------------------- + * Function: filter_bogus1 + * + * Purpose: A bogus filter that adds ADD_ON to the original value + * + * Return: Success: Data chunk size + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static size_t +filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr=(int *)*buf; /* Pointer to the data values */ + ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */ + + if(flags & H5Z_FLAG_REVERSE) { /* read */ + /* Substract the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ -= (int)ADD_ON; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end if */ + else { /* write */ + /* Add the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ += (int)ADD_ON; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* filter_bogus1() */ + +/*------------------------------------------------------------------------- + * Function: filter_bogus2 + * + * Purpose: A bogus filter that multiplies the original value by FACTOR. + * + * Return: Success: Data chunk size + * + * Programmer: Raymond Lu + * 30 November 2012 + *------------------------------------------------------------------------- + */ +static size_t +filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr=(int *)*buf; /* Pointer to the data values */ + ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */ + + if(flags & H5Z_FLAG_REVERSE) { /* read */ + /* Substract the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ /= (int)FACTOR; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end if */ + else { /* write */ + /* Add the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ *= (int)FACTOR; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* filter_bogus2() */ + +/*------------------------------------------------------------------------- + * Function: test_skip_compress_write2 + * + * Purpose: Test skipping compression filter when there are three filters + * for the dataset + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_skip_compress_write2(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; /* orig filter mask */ + int origin_direct_buf[CHUNK_NX][CHUNK_NY]; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + unsigned read_filter_mask = 0; /* filter mask after direct read */ + int read_direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t read_buf_size = 0; /* buf size */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("skipping compression filters but keep two other filters"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression. + * The order of filters is bogus 1 + deflate + bogus 2. + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Register and enable first bogus filter */ + if(H5Zregister (H5Z_BOGUS1) < 0) + goto error; + + if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0) + goto error; + + /* Enable compression filter */ + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* Register and enable second bogus filter */ + if(H5Zregister (H5Z_BOGUS2) < 0) + goto error; + + if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk. Apply operations of two bogus filters to the chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + origin_direct_buf[i][j] = n++; + direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR; + } + + /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function. + * Indicate skipping the compression filter but keep the other two bogus filters */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + /* compression filter is the middle one to be skipped */ + filter_mask = 0x00000002; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for one chunk in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(origin_direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size != buf_size) + goto error; + + /* Read the raw chunk back */ + HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf)); + if((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0) + goto error; + if(read_filter_mask != filter_mask) + goto error; + + /* Check that the direct chunk read is the same as the chunk written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != read_direct_buf[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_skip_compress_write2() */ + +/*------------------------------------------------------------------------- + * Function: test_data_conv + * + * Purpose: Test data conversion + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_data_conv(hid_t file) +{ + typedef struct { + int a, b, c[4], d, e; + } src_type_t; + typedef struct { + int a, c[4], e; + } dst_type_t; + + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + const hsize_t four = 4; + hid_t st=-1, dt=-1; + hid_t array_dt; + + unsigned filter_mask = 0; + src_type_t direct_buf[CHUNK_NX][CHUNK_NY]; + dst_type_t check_chunk[CHUNK_NX][CHUNK_NY]; + src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5Dread_chunk */ + + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(src_type_t); + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("data conversion for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Build hdf5 datatypes */ + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); + if((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 || + H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 || + H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0) + goto error; + + if(H5Tclose(array_dt) < 0) + goto error; + + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); + if((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 || + H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 || + H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 || + H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0) + goto error; + + if(H5Tclose(array_dt) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + (direct_buf[i][j]).a = i*j+0; + (direct_buf[i][j]).b = i*j+1; + (direct_buf[i][j]).c[0] = i*j+2; + (direct_buf[i][j]).c[1] = i*j+3; + (direct_buf[i][j]).c[2] = i*j+4; + (direct_buf[i][j]).c[3] = i*j+5; + (direct_buf[i][j]).d = i*j+6; + (direct_buf[i][j]).e = i*j+7; + } + } + + /* write the chunk data to dataset, using the direct writing function. + * There should be no data conversion involved. */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0) + goto error; + + /* Use H5Dread_chunk() to read the uncompressed data */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, read_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if ((direct_buf[i][j]).a != (read_chunk[i][j]).a || + (direct_buf[i][j]).b != (read_chunk[i][j]).b || + (direct_buf[i][j]).c[0] != (read_chunk[i][j]).c[0] || + (direct_buf[i][j]).c[1] != (read_chunk[i][j]).c[1] || + (direct_buf[i][j]).c[2] != (read_chunk[i][j]).c[2] || + (direct_buf[i][j]).c[3] != (read_chunk[i][j]).c[3] || + (direct_buf[i][j]).d != (read_chunk[i][j]).d || + (direct_buf[i][j]).e != (read_chunk[i][j]).e) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1], + (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e); + HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (read_chunk[i][j]).a, (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1], + (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d, (read_chunk[i][j]).e); + + goto error; + } + } + } + + /* + * Select hyperslab for the chunk just written in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back. Data should be converted */ + if((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if ((direct_buf[i][j]).a != (check_chunk[i][j]).a || + (direct_buf[i][j]).c[0] != (check_chunk[i][j]).c[0] || + (direct_buf[i][j]).c[1] != (check_chunk[i][j]).c[1] || + (direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] || + (direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] || + (direct_buf[i][j]).e != (check_chunk[i][j]).e) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1], + (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e); + HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", + (check_chunk[i][j]).a, (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2], + (check_chunk[i][j]).c[3], (check_chunk[i][j]).e); + + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Tclose(st); + H5Tclose(dt); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Tclose(st); + H5Tclose(dt); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_data_conv() */ + +/*------------------------------------------------------------------------- + * Function: test_invalid_parameters + * + * Purpose: Test invalid parameters for H5Dwrite_chunk and H5Dread_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_invalid_parameters(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + hsize_t chunk_nbytes; /* Chunk size */ + + TESTING("invalid parameters for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + /* + * Create a new contiguous dataset to verify H5Dwrite_chunk/H5Dread_chunk doesn't work + */ + if((dataset = H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + direct_buf[i][j] = n++; + } + + /* Try to write the chunk data to contiguous dataset. It should fail */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Try to get chunk size for a contiguous dataset. It should fail */ + H5E_BEGIN_TRY { + if((status = H5Dget_chunk_storage_size(dataset, offset, &chunk_nbytes)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Try to H5Dread_chunk from the contiguous dataset. It should fail */ + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + if(H5Dclose(dataset) < 0) + goto error; + + + /* Create a chunked dataset with compression filter */ + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Check invalid dataset ID for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid DXPL ID for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid OFFSET for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, NULL, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check when OFFSET is out of dataset range for H5Dwrite_chunk and H5Dread_chunk */ + offset[0] = NX + 1; + offset[1] = NY; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check when OFFSET is not on chunk boundary for H5Dwrite_chunk and H5Dread_chunk */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY + 1; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid buffer size for H5Dwrite_chunk only */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + buf_size = 0; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid data buffer for H5Dwrite_chunk and H5Dread_chunk */ + buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, NULL)) != FAIL) + goto error; + } H5E_END_TRY; + + if(H5Dclose(dataset) < 0) + goto error; + + /* + * Close/release resources. + */ + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_invalid_parameters() */ + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_read_no_cache + * + * Purpose: Test the basic functionality of H5Dread_chunk with the + * chunk cache diabled. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 14 February 2016 + * + *------------------------------------------------------------------------- + */ +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_read_no_cache (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1, dapl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + herr_t status; /* status from H5 function calls */ + int ret; /* deflate return status */ + int data[NX][NY]; + int i, j, k, l, n; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + Bytef *z_src = NULL; /* source buffer */ + uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + Bytef *z_dst = (Bytef*)(direct_buf); + uLong z_dst_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dread_chunk (chunk cache disabled)"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking and compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + goto error; + + /* Disable chunk cache by setting number of slots to 0 */ + if((status = H5Pset_chunk_cache(dapl, 0, H5D_CHUNK_CACHE_NBYTES_DEFAULT, H5D_CHUNK_CACHE_W0_DEFAULT)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME8, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, dapl)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * Data will skip chunk cache and go directly to disk. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_src_nbytes); + z_src = (Bytef *)outbuf; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + /* Read the compressed chunk back using the direct read function. */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Perform decompression from the source to the destination buffer */ + ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow\n"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error\n"); + goto error; + } else if(Z_DATA_ERROR == ret) { + HDfprintf(stderr, "corrupted data\n"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error\n"); + goto error; + } + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Pclose(dapl); + + if(outbuf) + HDfree(outbuf); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Pclose(dapl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_read_no_cache() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_read_cache (hid_t file, hbool_t flush) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + herr_t status; /* status from H5 function calls */ + int ret; /* deflate return status */ + int data[NX][NY]; + int i, j, k, l, n; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + Bytef *z_src = NULL; /* source buffer */ + uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + Bytef *z_dst = (Bytef*)(direct_buf); + uLong z_dst_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + hsize_t read_buf_size = 0; + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + if(flush) { + TESTING("basic functionality of H5Dread_chunk (flush chunk cache)"); + } else { + TESTING("basic functionality of H5Dread_chunk (does not flush chunk cache)"); + } + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking and compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, flush?DATASETNAME9:DATASETNAME10, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * It should stay in the chunk cache. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + if(flush) { + /* Flush the chunk cache to disk. Cache entry is not evicted. */ + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + } + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_src_nbytes); + z_src = (Bytef *)outbuf; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size == 0) + goto error; + + /* Read the compressed chunk back using the direct read function. */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Perform decompression from the source to the destination buffer */ + ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow\n"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error\n"); + goto error; + } else if(Z_DATA_ERROR == ret) { + HDfprintf(stderr, "corrupted data\n"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error\n"); + goto error; + } + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + if(outbuf) + HDfree(outbuf); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_read_cache() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +/*------------------------------------------------------------------------- + * Function: test_read_unfiltered_dset + * + * Purpose: Test the basic functionality of H5Dread_chunk on a dataset + * without no filters applied. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 30 November 2016 + * + *------------------------------------------------------------------------- + */ +static int +test_read_unfiltered_dset(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int data[NX][NY]; + int i, j, k, l, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + hsize_t read_buf_size = 0; + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dread_chunk on unfiltered datasets"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking, no compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME12, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * It should stay in the chunk cache and will be evicted/flushed by + * the H5Dread_chunk function call. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + + if(read_buf_size != buf_size ) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + /* Read the raw chunk back */ + HDmemset(&direct_buf, 0, sizeof(direct_buf)); + filter_mask = UINT_MAX; + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_read_unfiltered_dset() */ + +/*------------------------------------------------------------------------- + * Function: test_read_unallocated_chunk + * + * Purpose: Tests the H5Dread_chunk and H5Dget_chunk_storage_size with valid + * offets to chunks that have not been written to the dataset and are + * not allocated in the chunk storage on disk. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 30 November 2016 + * + *------------------------------------------------------------------------- + */ +static int +test_read_unallocated_chunk (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + hsize_t chunk_nbytes = CHUNK_NX*CHUNK_NY*sizeof(int); + hsize_t direct_chunk_nbytes = 0; /* size (bytes) of the on-disk chunk */ + herr_t status; /* status from H5 function calls */ + hsize_t i, j; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + + TESTING("H5Dread_chunk with unallocated chunks"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking, no compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME11, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write a single chunk to intialize the chunk storage */ + HDmemset(&chunk_dims, 0, sizeof(chunk_dims)); + offset[0] = 0; offset[1] = 0; + + if(H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, &chunk_dims) < 0) + goto error; + + /* Attempt to read each chunk in the dataset. Chunks are not allocated, + * therefore we expect the result of H5Dread_chunk to fail. Chunk idx starts + * at 1, since one chunk was written to init the chunk storage. */ + for(i=1; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + + offset[0] = i * CHUNK_NX; + offset[1] = j * CHUNK_NY; + + /* Read a non-existant chunk using the direct read function. */ + H5E_BEGIN_TRY { + status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, &direct_buf); + } H5E_END_TRY; + + /* Check that the chunk read call does not succeed. */ + if(status != -1) + goto error; + + /* Query the size of the non-existant chunk */ + direct_chunk_nbytes = ULONG_MAX; + H5E_BEGIN_TRY { + status = H5Dget_chunk_storage_size(dataset, offset, &direct_chunk_nbytes); + } H5E_END_TRY; + + /* Check that the chunk storage size call does not succeed. */ + if(status != -1 ) + goto error; + if(direct_chunk_nbytes != 0 ) + goto error; + + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_read_unallocated_chunk() */ + +/*------------------------------------------------------------------------- + * Function: test_single_chunk_latest + * + * Purpose: This is to verify the fix for jira issue HDFFV-10425. + * The problem was due to a bug in the internal ilbrary routine + * H5D__chunk_direct_write() which passed a null dataset + * pointer to the insert callback for the chunk index type. + * Currently, the single chunk index is the only one that + * used the dataset pointer in the insert callback. + * + * This routine is based on the test program attached to + * this jira issue: + * Create a file with the latest format and a chunked dataset + * with one single chunk. The library will use single chunk + * index for the dataset. + * Verify that the data read is the same as the written data. + * + * Return: Success: 0 + * Failure: 1 + * + *------------------------------------------------------------------------- + */ +static int +test_single_chunk_latest(void) +{ + hid_t fid; /* File ID */ + hid_t fapl; /* File access property list ID */ + hid_t sid; /* Dataspace ID */ + hid_t did; /* Dataset ID */ + hid_t dcpl; /* Dataset creation property list */ + hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */ + hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */ + hsize_t offset[2] = {0,0}; /* Offset for writing */ + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int i, j; /* Local index variable */ + + TESTING("H5Dwrite_chunk with single chunk and latest format"); + + /* Initialize data */ + for (i=0; i<DIM0; i++) { + for (j=0; j< DIM1; j++) + wdata[i][j] = j/CHUNK0; + } + + /* Create a new file with the latest format */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + goto error; + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + goto error; + if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + goto error; + + /* Create dataspace */ + if((sid = H5Screate_simple(2, dims, NULL)) < 0) + goto error; + + /* Create the dataset creation property list and set the chunk size */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if(H5Pset_chunk(dcpl, 2, chunk) < 0) + goto error; + + /* Create the dataset */ + if((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + goto error; + + /* Write the data directly to the dataset */ + if(H5Dwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0*CHUNK1*4, (void *)wdata) < 0) + goto error; + + /* + * Close and release resources. + */ + if(H5Pclose(dcpl) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + if(H5Sclose(sid) < 0) + goto error; + if(H5Pclose(fapl) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + + /* Open the file and dataset with default properties */ + if((fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + goto error; + if((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0) + goto error; + + /* Retrieve dataset creation property list */ + if((dcpl = H5Dget_create_plist(did)) < 0) + goto error; + + /* Read the data */ + if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0) + goto error; + + /* Verify that the data read was correct. */ + for (i = 0; i < DIM0; i++) { + for (j = 0; j < DIM1; j++) { + if(rdata[i][j] != wdata[i][j]) + goto error; + } + } + + /* + * Close and release resources + */ + if(H5Pclose(dcpl) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(did); + H5Sclose(sid); + H5Pclose(dcpl); + H5Pclose(fapl); + H5Fclose(fid); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_single_chunk_latest() */ + +/*------------------------------------------------------------------------- + * Function: Main function + * + * Purpose: Test direct chunk write function H5Dwrite_chunk and + * chunk direct read function H5Dread_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +int main( void ) +{ + hid_t file_id; + int nerrors=0; + + /* + * Create a new file. If file exists its contents will be overwritten. + */ + if((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Test direct chunk write and direct chunk read */ +#ifdef H5_HAVE_FILTER_DEFLATE + nerrors += test_direct_chunk_write(file_id); +#endif /* H5_HAVE_FILTER_DEFLATE */ + nerrors += test_direct_chunk_overwrite_data(file_id); + nerrors += test_skip_compress_write1(file_id); + nerrors += test_skip_compress_write2(file_id); + nerrors += test_data_conv(file_id); + nerrors += test_invalid_parameters(file_id); + + /* Test direct chunk read */ +#ifdef H5_HAVE_FILTER_DEFLATE + nerrors += test_direct_chunk_read_no_cache(file_id); + nerrors += test_direct_chunk_read_cache(file_id, TRUE); + nerrors += test_direct_chunk_read_cache(file_id, FALSE); +#endif /* H5_HAVE_FILTER_DEFLATE */ + nerrors += test_read_unfiltered_dset(file_id); + nerrors += test_read_unallocated_chunk(file_id); + + nerrors += test_single_chunk_latest(); + + if(H5Fclose(file_id) < 0) + goto error; + + /* check for errors */ + if (nerrors) + goto error; + + HDputs("All direct chunk read/write tests passed."); + return EXIT_SUCCESS; + +error: + HDputs("*** TESTS FAILED ***"); + return EXIT_FAILURE; +} diff --git a/test/dsets.c b/test/dsets.c index 0788bc8..d23f438 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -28,6 +28,7 @@ #include "H5srcdir.h" #include "H5Bprivate.h" +#include "H5CXprivate.h" /* API Contexts */ #include "H5Iprivate.h" #include "H5Pprivate.h" @@ -2036,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); @@ -2532,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"); @@ -2544,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; @@ -2738,10 +2746,16 @@ 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; } @@ -10705,9 +10719,9 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -10825,9 +10839,9 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -10945,9 +10959,9 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -12666,7 +12680,7 @@ dls_01_read_stuff( hid_t fid ) { did = H5Dopen2( fid, DLS_01_DATASET, H5P_DEFAULT ); if ( did <= 0 ) TEST_ERROR - status = H5Oget_info( did, &info ); + status = H5Oget_info2( did, &info, H5O_INFO_BASIC ); if ( status != 0 ) TEST_ERROR status = H5Dclose( did ); diff --git a/test/dtransform.c b/test/dtransform.c index 0381bb8..f022699 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -744,7 +744,7 @@ test_getset(const hid_t dxpl_id_c_to_f) HDfree(ptrgetTest); ptrgetTest = NULL; - TESTING("data transform, read after reseting of transform property") + TESTING("data transform, read after resetting of transform property") if(H5Pset_data_transform(dxpl_id_c_to_f, simple) < 0) TEST_ERROR diff --git a/test/dtypes.c b/test/dtypes.c index 1a27634..3253d6c 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -5897,7 +5897,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR old_dtype_oh_size = oi.hdr.space.total; @@ -5922,7 +5922,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ @@ -5958,7 +5958,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR new_dtype_oh_size = oi.hdr.space.total; @@ -5987,7 +5987,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ diff --git a/test/earray.c b/test/earray.c index 1058565..d72b3f5 100644 --- a/test/earray.c +++ b/test/earray.c @@ -25,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 */ @@ -406,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 */ @@ -414,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 */ @@ -441,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 */ @@ -467,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 */ @@ -555,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 @@ -565,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 */ @@ -627,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 */ @@ -642,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 */ @@ -656,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 */ @@ -671,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 */ @@ -684,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 */ @@ -697,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 */ @@ -712,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 */ @@ -728,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 */ @@ -742,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 */ @@ -755,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 */ @@ -779,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() @@ -803,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; @@ -842,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 */ @@ -873,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; @@ -915,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 */ @@ -929,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 */ @@ -946,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 */ @@ -954,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; @@ -977,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; @@ -1027,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 */ @@ -1041,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; @@ -1053,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 */ @@ -1061,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; @@ -1092,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 */ @@ -1117,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); @@ -1163,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 */ @@ -1181,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 @@ -1238,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; @@ -2111,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 */ @@ -2119,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 */ @@ -2150,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 */ @@ -2178,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 */ @@ -2187,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 */ @@ -2215,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 */ @@ -2239,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; @@ -2285,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 */ @@ -2293,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 */ @@ -2314,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 */ @@ -2323,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 */ @@ -2365,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 */ @@ -2376,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 */ @@ -2396,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; @@ -2428,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(); @@ -2439,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); @@ -2585,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."); @@ -2601,6 +2611,8 @@ error: H5Pclose(fapl); } H5E_END_TRY; + if(api_ctx_pushed) H5CX_pop(); + return 1; } /* end main() */ @@ -18,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[] = { @@ -35,9 +36,8 @@ static char filename[6][1024]; /* Global property lists - just copies of the defaults (necessary to use * internal functions */ -hid_t fcpl_id = -1; -hid_t fapl_id = -1; -hid_t dxpl_id = -1; +hid_t fcpl_id = H5I_INVALID_HID; +hid_t fapl_id = H5I_INVALID_HID; /*------------------------------------------------------------------------- @@ -68,15 +68,15 @@ 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. */ + /* 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. + */ 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 */ @@ -85,20 +85,19 @@ 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))) + * 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))) 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 @@ -109,15 +108,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 @@ -125,7 +122,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 @@ -133,40 +130,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 @@ -175,14 +166,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 @@ -193,8 +182,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 @@ -207,8 +195,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 @@ -221,8 +208,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 @@ -235,8 +221,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 @@ -249,7 +234,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 @@ -270,17 +255,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 @@ -288,7 +271,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 @@ -300,42 +283,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 @@ -348,8 +325,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 @@ -357,8 +334,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 @@ -367,7 +344,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 @@ -383,50 +360,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 @@ -443,7 +412,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 @@ -464,23 +433,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 @@ -488,7 +454,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 @@ -538,39 +504,37 @@ 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 - * because we don't test the EFC becoming too large in this test. */ + /* 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 + * 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 - /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file - * 2 through file 1. Release file 0's EFC and verify that file 2 gets its - * ref count reduced (implying file 1 was closed). Do the same with the - * opening order reversed. */ + /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file + * 2 through file 1. Release file 0's EFC and verify that file 2 gets its + * 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 @@ -580,19 +544,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 @@ -600,12 +561,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 @@ -619,47 +579,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 @@ -679,23 +632,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 @@ -703,28 +652,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 @@ -741,25 +689,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 @@ -767,13 +711,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 @@ -788,34 +731,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 @@ -823,45 +761,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 @@ -917,33 +851,33 @@ 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 - * because we don't test the EFC becoming too large in this test. */ + /* 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 + * 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 - /* Test 1: File caches itself. Verify that closing the file causes it to be - * actually closed, and there is no other unexpected behavior. */ + /* 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 @@ -952,8 +886,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 @@ -965,15 +898,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 @@ -981,23 +912,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 @@ -1008,8 +937,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 @@ -1019,15 +947,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 @@ -1035,17 +961,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 @@ -1056,8 +981,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 @@ -1067,19 +991,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 @@ -1092,8 +1013,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 @@ -1103,26 +1023,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 @@ -1133,8 +1050,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 @@ -1144,26 +1060,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 @@ -1171,7 +1084,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 @@ -1181,33 +1094,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 @@ -1222,8 +1131,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 @@ -1233,33 +1141,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 @@ -1271,7 +1175,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 @@ -1281,18 +1185,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 @@ -1309,8 +1210,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 @@ -1320,18 +1220,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 @@ -1346,8 +1243,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 @@ -1357,16 +1253,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 @@ -1376,29 +1270,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 @@ -1413,8 +1303,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 @@ -1424,24 +1313,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 @@ -1451,29 +1337,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 @@ -1484,14 +1366,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 @@ -1505,36 +1387,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 @@ -1553,8 +1430,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 @@ -1564,32 +1440,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 @@ -1600,36 +1472,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 @@ -1644,14 +1511,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 @@ -1665,30 +1532,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 @@ -1702,32 +1565,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 @@ -1737,30 +1596,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 @@ -1771,31 +1626,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 @@ -1805,33 +1657,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 @@ -1845,8 +1692,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 @@ -1858,24 +1704,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 @@ -1886,33 +1729,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 @@ -1923,34 +1761,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 @@ -1966,55 +1801,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 @@ -2030,48 +1859,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 @@ -2083,55 +1906,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 @@ -2144,47 +1961,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 @@ -2195,65 +2007,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 @@ -2272,8 +2076,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 @@ -2289,8 +2092,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 @@ -2301,48 +2103,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 @@ -2354,65 +2150,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 @@ -2425,7 +2213,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 @@ -2433,15 +2221,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 @@ -2449,15 +2236,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 @@ -2465,8 +2251,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 @@ -2484,86 +2269,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 @@ -2578,32 +2359,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 @@ -2614,86 +2391,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 @@ -2705,31 +2478,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 @@ -2739,15 +2509,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 @@ -2756,7 +2524,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 @@ -2767,7 +2535,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 @@ -2777,30 +2545,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 @@ -2817,30 +2582,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 @@ -2859,8 +2620,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 @@ -2873,15 +2633,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 @@ -2892,22 +2650,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 @@ -2916,29 +2671,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 @@ -2950,30 +2701,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 @@ -2984,7 +2731,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 @@ -2995,7 +2742,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 @@ -3010,21 +2757,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 @@ -3039,19 +2784,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 @@ -3066,15 +2809,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 @@ -3084,15 +2825,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 @@ -3100,9 +2839,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 @@ -3113,22 +2851,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 @@ -3162,6 +2897,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"); @@ -3169,7 +2905,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])); @@ -3179,6 +2914,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(); @@ -3191,6 +2930,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; @@ -3207,6 +2950,8 @@ error: H5Pclose(fapl_id); } H5E_END_TRY + if(api_ctx_pushed) H5CX_pop(); + return 1; } /* end main() */ diff --git a/test/enum.c b/test/enum.c index 4e20713..588e9b3 100644 --- a/test/enum.c +++ b/test/enum.c @@ -374,7 +374,7 @@ test_tr2(hid_t file) E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; c_e1 data2[10]; - TESTING("O(log N) converions"); + TESTING("O(log N) conversions"); if((cwg = H5Gcreate2(file, "test_tr2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR diff --git a/test/farray.c b/test/farray.c index f9f97bf..383cb32 100644 --- a/test/farray.c +++ b/test/farray.c @@ -25,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 */ @@ -265,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 */ @@ -273,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 */ @@ -300,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 */ @@ -323,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 */ @@ -400,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 */ @@ -462,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 */ @@ -477,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 */ @@ -492,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 */ @@ -516,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() @@ -540,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; @@ -576,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 */ @@ -607,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; @@ -646,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 */ @@ -660,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 */ @@ -677,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 */ @@ -685,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; @@ -708,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; @@ -758,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 */ @@ -772,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; @@ -784,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; @@ -819,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 */ @@ -844,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); @@ -887,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 */ @@ -905,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 @@ -962,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; @@ -1391,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 */ @@ -1399,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) @@ -1431,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 */ @@ -1458,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 */ @@ -1467,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 */ @@ -1502,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; @@ -1546,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 */ @@ -1554,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) @@ -1576,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 */ @@ -1585,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 */ @@ -1596,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 */ @@ -1608,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 */ @@ -1629,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; @@ -1658,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(); @@ -1669,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); @@ -1788,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."); @@ -1804,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 1be952f..e38d263 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -29,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 @@ -169,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); @@ -359,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 */ @@ -381,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 */ @@ -409,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 @@ -582,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; @@ -612,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 */ @@ -639,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) { @@ -663,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 @@ -680,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 */ @@ -707,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 @@ -723,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 */ @@ -750,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 */ @@ -786,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) @@ -794,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... */ @@ -804,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 */ @@ -855,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 */ @@ -890,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 */ @@ -912,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 */ @@ -949,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 */ @@ -965,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 */ @@ -987,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 */ @@ -1041,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 */ @@ -1098,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; @@ -1149,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; @@ -1174,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 */ @@ -1233,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 */ @@ -1303,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 */ @@ -1330,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 */ @@ -1349,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 */ @@ -1376,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 */ @@ -1384,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 */ @@ -1413,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 */ @@ -1425,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 */ @@ -1453,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 */ @@ -1465,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 */ @@ -1492,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 */ @@ -1504,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 */ @@ -1532,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 */ @@ -1543,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 */ @@ -1571,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 */ @@ -1582,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 */ @@ -1610,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 */ @@ -1649,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 */ @@ -1661,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 */ @@ -1689,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 */ @@ -1701,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 */ @@ -1729,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 */ @@ -1741,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 */ @@ -1779,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 */ @@ -1791,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 */ @@ -1879,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 @@ -1903,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 */ @@ -1930,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); @@ -2002,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 @@ -2017,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 */ @@ -2041,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 */ @@ -2052,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 */ @@ -2081,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); @@ -2155,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 @@ -2170,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 */ @@ -2181,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 */ @@ -2202,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 */ @@ -2213,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; @@ -2225,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 */ @@ -2254,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; @@ -2324,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 @@ -2339,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 */ @@ -2354,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; @@ -2397,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 @@ -2427,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); @@ -2453,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 */ @@ -2490,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 */ @@ -2510,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; @@ -2520,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 */ @@ -2540,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; @@ -2555,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 */ @@ -2575,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; @@ -2588,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 @@ -2600,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 */ @@ -2620,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; @@ -2631,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 */ @@ -2651,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; @@ -2662,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 */ @@ -2682,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; @@ -2693,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 */ @@ -2713,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; @@ -2724,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 */ @@ -2744,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; @@ -2756,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 @@ -2774,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); @@ -2798,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 */ @@ -2835,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 */ @@ -2845,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; @@ -2866,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 */ @@ -2877,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 @@ -2897,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); @@ -2921,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 */ @@ -2950,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 */ @@ -2961,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; @@ -3000,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 @@ -3038,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); @@ -3066,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 */ @@ -3093,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 */ @@ -3103,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; @@ -3133,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; @@ -3151,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 @@ -3176,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; @@ -3202,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 */ @@ -3228,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 @@ -3243,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 /* @@ -3253,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 */ @@ -3272,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; @@ -3288,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); @@ -3314,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 */ @@ -3338,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 @@ -3353,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 /* @@ -3363,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 */ @@ -3375,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 */ @@ -3390,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); @@ -3415,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 */ @@ -3439,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 @@ -3458,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 */ @@ -3485,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); @@ -3511,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 */ @@ -3536,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 @@ -3560,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 */ @@ -3583,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); @@ -3610,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 */ @@ -3635,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 @@ -3659,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 */ @@ -3689,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); @@ -3716,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 */ @@ -3741,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 @@ -3765,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 */ @@ -3795,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); @@ -3823,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 */ @@ -3848,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 @@ -3872,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 */ @@ -3907,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); @@ -3934,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 */ @@ -3959,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 @@ -3980,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 */ @@ -4003,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); @@ -4030,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 */ @@ -4055,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 @@ -4076,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 */ @@ -4106,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); @@ -4133,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 */ @@ -4158,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 @@ -4179,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 */ @@ -4206,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); @@ -4234,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 */ @@ -4259,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 @@ -4280,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 */ @@ -4298,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 */ @@ -4317,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); @@ -4344,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 */ @@ -4370,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 @@ -4392,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 */ @@ -4415,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); @@ -4442,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 */ @@ -4467,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 @@ -4488,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 */ @@ -4511,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); @@ -4538,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 */ @@ -4563,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 @@ -4584,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 */ @@ -4612,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); @@ -4640,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 */ @@ -4665,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 @@ -4687,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 */ @@ -4722,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); @@ -4750,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 */ @@ -4775,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 @@ -4797,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 */ @@ -4824,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); @@ -4853,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 */ @@ -4878,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 @@ -4900,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 */ @@ -4934,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); @@ -4964,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 */ @@ -4989,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 @@ -5011,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 */ @@ -5042,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); @@ -5072,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 */ @@ -5093,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 @@ -5115,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 */ @@ -5142,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); @@ -5170,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 */ @@ -5195,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 @@ -5217,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 */ @@ -5251,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); @@ -5279,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 */ @@ -5304,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 @@ -5326,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 */ @@ -5353,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); @@ -5382,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 */ @@ -5407,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 @@ -5429,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 */ @@ -5463,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); @@ -5492,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 */ @@ -5517,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 @@ -5539,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 */ @@ -5574,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); @@ -5603,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 */ @@ -5628,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 @@ -5650,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 */ @@ -5681,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); @@ -5710,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 */ @@ -5735,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 @@ -5757,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 */ @@ -5788,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); @@ -5818,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 */ @@ -5843,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 @@ -5865,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 */ @@ -5903,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); @@ -5933,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 */ @@ -5958,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 @@ -5980,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 */ @@ -6023,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); @@ -6053,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 */ @@ -6078,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 @@ -6100,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 */ @@ -6135,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); @@ -6165,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 */ @@ -6190,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 @@ -6212,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 */ @@ -6247,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); @@ -6280,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 */ @@ -6305,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 @@ -6328,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 */ @@ -6382,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); @@ -6409,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 */ @@ -6439,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 @@ -6454,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 /* @@ -6480,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 */ @@ -6507,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 @@ -6515,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 */ @@ -6538,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); @@ -6563,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 */ @@ -6592,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 @@ -6609,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 */ @@ -6633,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 /* @@ -6646,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... */ @@ -6662,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... */ @@ -6678,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 */ @@ -6701,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); @@ -6726,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 */ @@ -6756,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 @@ -6773,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 */ @@ -6797,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 /* @@ -6810,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... */ @@ -6826,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... */ @@ -6840,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... */ @@ -6854,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... */ @@ -6870,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 */ @@ -6893,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); @@ -6919,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 */ @@ -6949,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 @@ -6966,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 */ @@ -6990,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 /* @@ -7003,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... */ @@ -7022,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... */ @@ -7038,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 */ @@ -7061,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); @@ -7087,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 */ @@ -7118,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 @@ -7135,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 */ @@ -7159,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 /* @@ -7175,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... */ @@ -7198,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... */ @@ -7220,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... */ @@ -7235,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... */ @@ -7260,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... */ @@ -7277,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 */ @@ -7304,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); @@ -7330,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 */ @@ -7362,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 @@ -7379,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 */ @@ -7403,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 /* @@ -7419,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... */ @@ -7442,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... */ @@ -7466,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... */ @@ -7488,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... */ @@ -7503,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... */ @@ -7518,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... */ @@ -7543,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... */ @@ -7563,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... */ @@ -7580,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 */ @@ -7607,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); @@ -7631,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 */ @@ -7661,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 @@ -7686,24 +7646,24 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ for(j = 0; j < i; 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 */ @@ -7718,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); @@ -7746,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 */ @@ -7762,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 @@ -7770,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 */ @@ -7794,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); @@ -7820,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 */ @@ -7836,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 @@ -7844,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... */ @@ -7859,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 */ @@ -7883,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); @@ -7909,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 */ @@ -7925,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 */ @@ -7954,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); @@ -7980,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 */ @@ -7996,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 */ @@ -8027,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); @@ -8053,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 */ @@ -8069,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 */ @@ -8104,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); @@ -8130,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 */ @@ -8146,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 */ @@ -8175,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); @@ -8201,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 */ @@ -8217,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 */ @@ -8250,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); @@ -8276,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 */ @@ -8292,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 */ @@ -8329,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); @@ -8360,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 */ @@ -8376,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; @@ -8387,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 */ @@ -8411,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); @@ -8438,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 */ @@ -8454,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 @@ -8467,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 */ @@ -8509,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); @@ -8537,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 */ @@ -8554,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 @@ -8567,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 */ @@ -8619,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); @@ -8647,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 */ @@ -8663,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 @@ -8671,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 @@ -8689,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 */ @@ -8713,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); @@ -8744,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 */ @@ -8762,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 @@ -8770,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 @@ -8788,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 */ @@ -8818,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 */ @@ -8856,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); @@ -8889,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 */ @@ -8907,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 @@ -8915,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 @@ -8944,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 */ @@ -9023,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); @@ -9055,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 */ @@ -9072,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 @@ -9095,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 */ @@ -9153,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); @@ -9182,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 */ @@ -9201,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 @@ -9220,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 */ @@ -9237,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 */ @@ -9257,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 */ @@ -9281,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); @@ -9309,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 */ @@ -9326,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 @@ -9343,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 */ @@ -9404,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); @@ -9433,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 */ @@ -9453,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 @@ -9461,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 @@ -9474,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 */ @@ -9532,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); @@ -9562,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 */ @@ -9581,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 @@ -9589,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 @@ -9615,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 @@ -9636,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 */ @@ -9675,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); @@ -9708,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 */ @@ -9728,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 @@ -9736,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 @@ -9752,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 */ @@ -9774,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 */ @@ -9786,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 */ @@ -9850,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); @@ -9878,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 */ @@ -9898,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 @@ -9907,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 @@ -9919,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 */ @@ -10002,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); @@ -10032,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 */ @@ -10052,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 @@ -10061,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 @@ -10073,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 @@ -10095,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 */ @@ -10183,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); @@ -10212,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 */ @@ -10229,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 @@ -10255,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 */ @@ -10310,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); @@ -10341,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 */ @@ -10358,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 @@ -10392,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 */ @@ -10449,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); @@ -10479,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 */ @@ -10498,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 @@ -10506,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 @@ -10538,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 @@ -10561,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 */ @@ -10600,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); @@ -10631,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 */ @@ -10650,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 @@ -10661,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 @@ -10693,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 */ @@ -10705,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 @@ -10719,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 */ @@ -10762,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); @@ -10794,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 */ @@ -10813,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 @@ -10821,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 @@ -10863,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 @@ -10885,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 */ @@ -10924,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); @@ -10957,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 */ @@ -10976,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 @@ -10984,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 @@ -11033,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 @@ -11054,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 */ @@ -11093,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); @@ -11124,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 */ @@ -11143,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 @@ -11151,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 @@ -11191,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 @@ -11214,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 */ @@ -11253,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); @@ -11286,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 */ @@ -11305,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 @@ -11313,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 @@ -11369,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 @@ -11392,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 */ @@ -11431,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); @@ -11466,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 */ @@ -11485,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 @@ -11493,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 */ @@ -11538,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 @@ -11582,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 @@ -11605,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 */ @@ -11644,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); @@ -11681,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 */ @@ -11700,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 @@ -11708,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 @@ -11779,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 @@ -11802,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 */ @@ -11841,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); @@ -11878,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 */ @@ -11897,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 @@ -11905,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 */ @@ -12000,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 @@ -12012,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 @@ -12035,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 */ @@ -12074,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); @@ -12106,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 */ @@ -12123,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 @@ -12136,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); @@ -12147,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 */ @@ -12163,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 */ @@ -12209,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); @@ -12238,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 */ @@ -12256,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 @@ -12272,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); @@ -12284,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 */ @@ -12303,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 */ @@ -12323,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 */ @@ -12342,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 */ @@ -12379,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); @@ -12410,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 */ @@ -12429,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 @@ -12440,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 @@ -12454,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 */ @@ -12492,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); @@ -12524,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 */ @@ -12543,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 @@ -12551,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 @@ -12573,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 */ @@ -12611,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); @@ -12639,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 */ @@ -12660,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) */ @@ -12675,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 @@ -12683,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... */ @@ -12693,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 @@ -12706,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... */ @@ -12722,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 */ @@ -12766,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); @@ -12792,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 */ @@ -12814,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) */ @@ -12831,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 @@ -12839,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... */ @@ -12849,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 @@ -12869,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... */ @@ -12879,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 @@ -12893,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... */ @@ -12907,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... */ @@ -12922,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... */ @@ -12936,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... */ @@ -12953,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 */ @@ -12999,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); @@ -13025,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 */ @@ -13048,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) */ @@ -13067,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 @@ -13075,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... */ @@ -13085,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 @@ -13105,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... */ @@ -13115,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 @@ -13135,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... */ @@ -13145,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 @@ -13159,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... */ @@ -13175,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... */ @@ -13191,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... */ @@ -13208,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... */ @@ -13224,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... */ @@ -13240,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... */ @@ -13259,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 */ @@ -13307,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); @@ -13333,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 */ @@ -13358,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) */ @@ -13381,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 @@ -13389,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... */ @@ -13399,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 @@ -13419,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... */ @@ -13429,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 @@ -13449,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... */ @@ -13459,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 @@ -13479,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... */ @@ -13496,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 @@ -13516,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... */ @@ -13534,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 @@ -13548,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... */ @@ -13564,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... */ @@ -13580,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... */ @@ -13596,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 */ @@ -13635,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... */ @@ -13651,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... */ @@ -13667,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 */ @@ -13683,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 */ @@ -13735,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); @@ -13759,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 */ @@ -13794,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 */ @@ -13829,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 @@ -13837,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; @@ -13864,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 */ @@ -13876,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 @@ -13889,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... */ @@ -13904,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 */ @@ -13947,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); @@ -13975,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 */ @@ -13996,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) */ @@ -14011,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 @@ -14019,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... */ @@ -14029,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 @@ -14042,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... */ @@ -14058,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 */ @@ -14102,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); @@ -14128,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 */ @@ -14150,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) */ @@ -14167,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 @@ -14175,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... */ @@ -14185,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 @@ -14205,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... */ @@ -14215,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 @@ -14229,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... */ @@ -14243,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... */ @@ -14258,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... */ @@ -14272,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... */ @@ -14289,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 */ @@ -14335,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); @@ -14362,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 */ @@ -14389,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) */ @@ -14416,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 @@ -14424,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... */ @@ -14434,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 @@ -14461,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... */ @@ -14471,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 @@ -14498,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... */ @@ -14508,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 @@ -14535,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... */ @@ -14552,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 @@ -14579,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... */ @@ -14597,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 @@ -14617,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 @@ -14625,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... */ @@ -14635,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 @@ -14662,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... */ @@ -14672,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 @@ -14693,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... */ @@ -14709,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... */ @@ -14725,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... */ @@ -14741,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 */ @@ -14763,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... */ @@ -14779,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... */ @@ -14804,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... */ @@ -14820,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 */ @@ -14842,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... */ @@ -14858,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... */ @@ -14874,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 */ @@ -14890,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 */ @@ -14946,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); @@ -14973,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 */ @@ -15001,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 */ @@ -15011,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 @@ -15019,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; @@ -15044,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... */ @@ -15056,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 @@ -15069,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... */ @@ -15085,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 */ @@ -15125,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); @@ -15149,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 */ @@ -15178,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 */ @@ -15188,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 @@ -15196,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 @@ -15209,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; @@ -15230,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... */ @@ -15242,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 @@ -15267,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; @@ -15294,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... */ @@ -15309,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; @@ -15330,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... */ @@ -15340,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; @@ -15367,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... */ @@ -15382,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; @@ -15403,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... */ @@ -15414,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 */ @@ -15454,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); @@ -15484,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 */ @@ -15518,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 */ @@ -15559,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 */ @@ -15598,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 */ @@ -15612,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 */ @@ -15659,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); @@ -15688,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 */ @@ -15722,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 */ @@ -15775,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 */ @@ -15814,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 */ @@ -15828,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 */ @@ -15876,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); @@ -15914,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 */ @@ -15973,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 */ @@ -15985,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) { @@ -16008,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; @@ -16044,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 */ @@ -16056,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 */ @@ -16084,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; @@ -16111,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 */ @@ -16133,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; @@ -16163,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); @@ -16191,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 */ @@ -16212,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 */ @@ -16224,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; @@ -16276,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; @@ -16306,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; @@ -16341,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 +16288,7 @@ main(void) 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"); @@ -16418,6 +16328,10 @@ main(void) 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); @@ -16880,12 +16794,12 @@ 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; @@ -16902,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/flushrefresh.c b/test/flushrefresh.c index 0775dee..4196d85 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -848,7 +848,7 @@ herr_t flush_verification(const char * obj_pathname, const char * expected) H5E_BEGIN_TRY { fid = H5Fopen(FILENAME, H5F_ACC_SWMR_READ, H5P_DEFAULT); oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT); - status = H5Oget_info(oid, &oinfo); + status = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; /* Compare to expected result */ @@ -989,7 +989,7 @@ herr_t refresh_verification(const char * obj_pathname) if((oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT)) < 0) PROCESS_ERROR; /* Get Object info */ - if((status = H5Oget_info(oid, &flushed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &flushed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Make sure there are no attributes on the object. This is just a sanity check to ensure we didn't erroneously flush the attribute before @@ -1008,7 +1008,7 @@ herr_t refresh_verification(const char * obj_pathname) /* Get object info again. This will NOT reflect what's on disk, only what's in the cache. Thus, all values will be unchanged from above, despite newer information being on disk. */ - if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Verify that before doing a refresh, getting the object info returns stale information. (i.e., unchanged from above, despite new info on disk). */ @@ -1046,7 +1046,7 @@ herr_t refresh_verification(const char * obj_pathname) } /* end else */ /* Get object info. This should now accurately reflect the refreshed object on disk. */ - if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Confirm following (first 4) attributes are the same: */ /* Confirm following (last 4) attributes are different */ diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake new file mode 100644 index 0000000..f66ee64 --- /dev/null +++ b/test/flushrefreshTest.cmake @@ -0,0 +1,172 @@ +# +# 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. +# +# runTest.cmake executes a command and captures the output in a file. File is then compared +# against a reference file. Exit status of command can also be compared. +cmake_policy(SET CMP0007 NEW) + +# arguments checking +if (NOT TEST_PROGRAM) + message (FATAL_ERROR "Require TEST_PROGRAM to be defined") +endif () +if (NOT TEST_FOLDER) + message ( FATAL_ERROR "Require TEST_FOLDER to be defined") +endif () +if (NOT TEST_OUTPUT) + message (FATAL_ERROR "Require TEST_OUTPUT to be defined") +endif () +if (NOT PERL_SCRIPT) + message (STATUS "Require PERL_BIN_DIR to be defined") +endif () +if (NOT PERL_EXECUTABLE) + message (STATUS "Require PERL_EXECUTABLE to be defined") +endif () + +if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) +endif () + +if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) +endif () + +message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") + +if (TEST_LIBRARY_DIRECTORY) + if (WIN32 AND NOT MINGW) + set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") + else () + set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") + endif () +endif () + +if (TEST_ENV_VAR) + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") +endif () + +message(STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}") +execute_process ( + COMMAND ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM} + RESULT_VARIABLE SCRIPT_RESULT + ERROR_VARIABLE SCRIPT_ERR + OUTPUT_VARIABLE SCRIPT_OUTPUT + WORKING_DIRECTORY ${TEST_FOLDER} +) +message(STATUS "Background: ${SCRIPT_OUTPUT}") +if (NOT "${SCRIPT_RESULT}" STREQUAL "0") + message (FATAL_ERROR "Failed: The background script failed ${SCRIPT_RESULT}: ${SCRIPT_ERR}") +endif () + +set(verification_done "0") +while(verification_done LESS "1") + message(STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}") + if(EXISTS ${TEST_FOLDER}/${TEST_ERR}) + # Error exit script + set(verification_done "3") + elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1}) + file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1) + list (LENGTH v1 len_v1) + message(STATUS "v1:${v1} len_v1:${len_v1}") + if (NOT "${len_v1}" STREQUAL "0") + list (GET v1 0 param1) + list (GET v1 -1 param2) + endif () + file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1}) + message(STATUS "PARAM1:${param1} PARAM2:${param2}") + + if(${param1} MATCHES "VERIFICATION_DONE") + set(verification_done "1") + file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete") + message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}") + else() + message(STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}") + execute_process ( + COMMAND ${TEST_PROGRAM} ${param1} ${param2} + RESULT_VARIABLE TEST_RESULT + OUTPUT_FILE ${TEST_OUTPUT} + ERROR_FILE ${TEST_OUTPUT}.err + OUTPUT_VARIABLE TEST_OUT + ERROR_VARIABLE TEST_ERROR + WORKING_DIRECTORY ${TEST_FOLDER} + ) + message(STATUS "flush verification: ${TEST_OUT}") + if (NOT "${TEST_RESULT}" STREQUAL "0") + message (FATAL_ERROR "Failed: The flush verification failed ${TEST_RESULT}: ${TEST_ERROR}") + endif () + file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done") + endif() + else() + message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}") + #execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2) + endif() +endwhile() + +while(verification_done LESS "2") + message(STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}") + if(EXISTS ${TEST_FOLDER}/${TEST_ERR}) + # Error exit script + set(verification_done "3") + elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1}) + file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1) + list (LENGTH v1 len_v1) + message(STATUS "v1:${v1} len_v1:${len_v1}") + if (NOT "${len_v1}" STREQUAL "0") + list (GET v1 0 param1) + list (GET v1 -1 param2) + endif () + file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1}) + message(STATUS "PARAM1:${param1} PARAM2:${param2}") + + if(${param1} MATCHES "VERIFICATION_DONE") + set(verification_done "2") + file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete") + message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}") + else() + message(STATUS "execute: ${TEST_PROGRAM} ${param1}") + execute_process ( + COMMAND ${TEST_PROGRAM} ${param1} + RESULT_VARIABLE TEST_RESULT + OUTPUT_FILE ${TEST_OUTPUT} + ERROR_FILE ${TEST_OUTPUT}.err + OUTPUT_VARIABLE TEST_OUT + ERROR_VARIABLE TEST_ERROR + WORKING_DIRECTORY ${TEST_FOLDER} + ) + message(STATUS "refresh verification: ${TEST_OUT}") + if (NOT "${TEST_RESULT}" STREQUAL "0") + message (FATAL_ERROR "Failed: The refresh verification failed ${TEST_RESULT}: ${TEST_ERROR}") + endif () + file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done") + endif() + else() + message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}") + #execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2) + endif() +endwhile() + +message (STATUS "COMMAND Result: ${TEST_RESULT}") + +# if the return value is !=${TEST_EXPECT} bail out +if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}") + if (NOT TEST_NOERRDISPLAY) + if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + message (STATUS "Output :\n${TEST_STREAM}") + endif () + endif () + message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") +endif () + +message (STATUS "COMMAND Error: ${TEST_ERROR}") + +# everything went fine... +message ("Passed") diff --git a/test/freespace.c b/test/freespace.c index 39c5688..33a6f89 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -23,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" @@ -446,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 */ @@ -486,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 @@ -512,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 @@ -527,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; @@ -548,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; @@ -559,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() */ @@ -595,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 */ @@ -636,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 @@ -654,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 @@ -669,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; @@ -704,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 @@ -717,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 @@ -732,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 */ @@ -776,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 @@ -791,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 @@ -802,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; @@ -845,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 @@ -860,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 @@ -872,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) */ @@ -881,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() @@ -905,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() */ @@ -937,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 */ @@ -967,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 @@ -985,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 @@ -995,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; @@ -1004,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 @@ -1021,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 @@ -1042,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 @@ -1061,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 @@ -1080,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 @@ -1091,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 @@ -1104,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) */ @@ -1123,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; @@ -1132,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 @@ -1149,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 @@ -1169,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 @@ -1180,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 @@ -1194,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) */ @@ -1203,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; @@ -1212,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 @@ -1229,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 @@ -1241,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) */ @@ -1257,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() @@ -1285,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() */ @@ -1329,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 */ @@ -1362,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 @@ -1383,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 @@ -1403,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 @@ -1421,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 @@ -1439,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 @@ -1451,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 @@ -1464,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; @@ -1496,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 @@ -1511,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 @@ -1531,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 @@ -1544,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) */ @@ -1566,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; @@ -1598,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 @@ -1613,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 @@ -1633,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 @@ -1653,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 @@ -1671,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 @@ -1687,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 @@ -1708,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 @@ -1721,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 @@ -1734,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() @@ -1760,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; @@ -1805,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 */ @@ -1838,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 @@ -1860,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 @@ -1873,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 @@ -1894,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 @@ -1905,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; @@ -1945,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 @@ -1960,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 @@ -1980,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 @@ -1989,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 @@ -2001,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 @@ -2014,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; @@ -2045,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 @@ -2060,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 @@ -2080,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 @@ -2090,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 @@ -2098,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() @@ -2127,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() */ @@ -2155,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 */ @@ -2184,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 @@ -2206,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 @@ -2226,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 @@ -2237,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 @@ -2246,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 @@ -2256,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) */ @@ -2265,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; @@ -2297,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 @@ -2312,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 @@ -2324,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 @@ -2336,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 @@ -2356,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 @@ -2367,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 @@ -2378,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) */ @@ -2387,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() @@ -2413,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() */ @@ -2455,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 */ @@ -2479,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 @@ -2491,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 @@ -2506,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 @@ -2526,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 @@ -2538,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 @@ -2551,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; @@ -2567,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 @@ -2582,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 @@ -2602,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 @@ -2614,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 @@ -2624,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; @@ -2640,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 @@ -2655,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 @@ -2675,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 @@ -2687,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 @@ -2698,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; @@ -2714,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 @@ -2729,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 @@ -2749,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 @@ -2761,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 @@ -2771,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; @@ -2785,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() */ @@ -2813,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 */ @@ -2845,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 @@ -2866,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); @@ -2882,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() @@ -2904,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() */ @@ -2918,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"); @@ -2931,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++; @@ -2953,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); @@ -2961,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/genall5.c b/test/genall5.c index e3a9c96..37bab7a 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -650,7 +650,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { @@ -1130,7 +1130,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { pass = FALSE; @@ -1825,7 +1825,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { diff --git a/test/getname.c b/test/getname.c index c3f3c54..873ceb9 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2390,7 +2390,7 @@ test_main(hid_t file_id, hid_t fapl) if((size = H5Iget_name(dtype_anon, NULL,0)) != 0) TEST_ERROR /* Store the address of the datatype for later use */ - if(H5Oget_info(dtype_anon, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(dtype_anon, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Update the reference count to dtype_anon to preserve the datatype */ if(H5Oincr_refcount(dtype_anon) < 0) TEST_ERROR @@ -2937,7 +2937,7 @@ test_elinks(hid_t fapl) /* Query the external link object's name */ *name = '\0'; name_cached = FALSE; - namelen = H5I_get_name_test(group, (char*)name, sizeof(name), &name_cached); + namelen = H5I__get_name_test(group, (char*)name, sizeof(name), &name_cached); if(!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached)) TEST_ERROR @@ -2952,7 +2952,7 @@ test_elinks(hid_t fapl) /* Query the external link to external link object's name */ *name = '\0'; name_cached = FALSE; - namelen = H5I_get_name_test(group, (char*)name, sizeof(name), &name_cached); + namelen = H5I__get_name_test(group, (char*)name, sizeof(name), &name_cached); if(!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached)) TEST_ERROR diff --git a/test/gheap.c b/test/gheap.c index 110255b..bf0f18a 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -21,6 +21,8 @@ */ #include "h5test.h" #include "H5ACprivate.h" +#include "H5CXprivate.h" /* API Contexts */ +#include "H5Eprivate.h" #include "H5Fprivate.h" #include "H5Gprivate.h" #include "H5HGprivate.h" @@ -95,11 +97,11 @@ test_1 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + 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; } /* @@ -108,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 */ @@ -153,7 +155,7 @@ test_1 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); @@ -200,43 +202,43 @@ test_2 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + 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 */ @@ -251,7 +253,7 @@ test_2 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); @@ -298,7 +300,7 @@ test_3 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[2], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { H5_FAILED(); puts(" Unable to create file"); @@ -307,25 +309,25 @@ test_3 (hid_t fapl) /* 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 */ @@ -340,7 +342,7 @@ test_3 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); @@ -388,40 +390,40 @@ test_4 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[3], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - 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++; + puts(" Unable to create file"); + goto error; } - /* - * 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)) { + 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_remove (f, H5AC_ind_read_dxpl_id, obj + u - 1); + status = H5HG_insert(f, size, out, obj + u); if (status<0) { - H5_FAILED(); - puts(" Unable to remove object"); - nerrors++; + 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); } - HDmemset(obj + u - 1, 0, sizeof *obj); - } } /* Release buffer */ @@ -436,7 +438,7 @@ test_4 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); @@ -497,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") @@ -510,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 */ @@ -532,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(); @@ -543,14 +545,16 @@ test_ooo_indices(hid_t fapl) if (H5Fclose(file)<0) goto error; if (nerrors) goto error; + HDfree(obj); obj = NULL; + PASSED(); return 0; error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); @@ -579,10 +583,15 @@ main (void) { 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); @@ -592,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 bbdd58b..687f594 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1694,8 +1694,8 @@ h5_verify_cached_stabs(const char *base_name[], hid_t fapl) continue; } /* end if */ - if(H5Ovisit(file, H5_INDEX_NAME, H5_ITER_NATIVE, - h5_verify_cached_stabs_cb, NULL) < 0) + if(H5Ovisit2(file, H5_INDEX_NAME, H5_ITER_NATIVE, + h5_verify_cached_stabs_cb, NULL, H5O_INFO_BASIC) < 0) goto error; if(H5Fclose(file) < 0) diff --git a/test/istore.c b/test/istore.c index f100fe4..b5bac2c 100644 --- a/test/istore.c +++ b/test/istore.c @@ -215,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) diff --git a/test/lheap.c b/test/lheap.c index f5b7f77..4f09b6e 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -20,6 +20,7 @@ #include "h5test.h" #include "H5srcdir.h" #include "H5ACprivate.h" +#include "H5CXprivate.h" /* API Contexts */ #include "H5HLprivate.h" #include "H5Iprivate.h" @@ -62,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... @@ -85,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; @@ -102,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; @@ -142,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; @@ -199,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); @@ -209,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 7b3e37d..fb2c75a 100644 --- a/test/links.c +++ b/test/links.c @@ -541,8 +541,8 @@ cklinks(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR /* Hard link */ - if(H5Oget_info_by_name(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "grp1/hard", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -577,7 +577,7 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ /* Symbolic link */ - if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "grp1/soft", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -599,7 +599,7 @@ cklinks(hid_t fapl, hbool_t new_format) /* Dangling link */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file, "grp1/dangle", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name2(file, "grp1/dangle", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -626,7 +626,7 @@ cklinks(hid_t fapl, hbool_t new_format) /* Recursive link */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file, "grp1/recursive", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name2(file, "grp1/recursive", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -696,11 +696,11 @@ ck_new_links(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Get hard link info */ - if(H5Oget_info_by_name(file, "/grp1/dataset2", &oi_dset, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp1/dataset2", &oi_dset, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file, "/grp1/hard1", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp1/hard1", &oi_hard1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file, "/grp2/hard2", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp2/hard2", &oi_hard2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Check hard links */ @@ -1504,7 +1504,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the group's link's information */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR old_cset = linfo.cset; if(old_cset != H5T_CSET_UTF8) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1523,7 +1523,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the link's character set & modification time . They should be unchanged */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(old_cset != linfo.cset) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1531,7 +1531,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Create a new link to the group. It should have a different creation order value but the same modification time */ if(H5Lcreate_hard(file_id, "group", file_id, "group2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_corder == linfo.corder) TEST_ERROR @@ -1544,7 +1544,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * should not change. */ if(H5Lcopy(file_id, "group", file_id, "group_copied", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_copied", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1555,7 +1555,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link with the default property list. */ if(H5Lmove(file_id, "group_copied", file_id, "group_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_copied2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1565,7 +1565,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR /* Check that the original link is unchanged */ - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1576,7 +1576,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * Its creation order value will change, but modification time should not * change. */ if(H5Lmove(file_id, "group", file_id, "group_moved", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_moved", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1587,7 +1587,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link again using the default property list. */ if(H5Lmove(file_id, "group_moved", file_id, "group_moved_again", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_moved_again", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -3521,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]; @@ -5377,7 +5377,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(HDstrcmp(object_name, "/dst")) TEST_ERROR /* Query information about object that external link points to */ - if(H5Oget_info_by_name(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(fid, "src", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_GROUP != oi.type) { H5_FAILED(); HDputs(" Unexpected object type - should have been a group"); @@ -6110,8 +6110,8 @@ external_link_closing(hid_t fapl, hbool_t new_format) /* Test that getting info works */ if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink/elink/type1", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink/elink", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Test move */ if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, @@ -6198,7 +6198,7 @@ external_link_closing(hid_t fapl, hbool_t new_format) if(H5Gclose(gid) < 0) TEST_ERROR if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink2/group2/group3/group4", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Add a few regular groups and a soft link in file2 using intermediate group creation */ if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR @@ -7762,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; @@ -7998,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; @@ -8201,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; @@ -8437,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; @@ -8587,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; @@ -9604,13 +9608,13 @@ obj_visit(hid_t fapl, hbool_t new_format) /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from the root group (with group ID) */ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9618,13 +9622,13 @@ obj_visit(hid_t fapl, hbool_t new_format) if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9674,36 +9678,36 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format) /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from the root group (with group ID) */ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from each internal group */ udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit_by_name(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit_by_name(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9780,15 +9784,15 @@ obj_visit_stop(hid_t fapl, hbool_t new_format) * returns H5_ITER_STOP */ nvisited = 0; - if((ret = H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited)) < 0) + if((ret = H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited, H5O_INFO_BASIC)) < 0) FAIL_STACK_ERROR if(ret != H5_ITER_STOP) TEST_ERROR if(nvisited != 1) TEST_ERROR /* Same test with H5Ovisit_by_name */ nvisited = 0; - if((ret = H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, - &nvisited, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((ret = H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, + &nvisited, H5O_INFO_BASIC, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR if(ret != H5_ITER_STOP) TEST_ERROR if(nvisited != 1) TEST_ERROR @@ -11592,7 +11596,7 @@ link_info_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -12091,7 +12095,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -12164,7 +12168,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -13159,7 +13163,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(obj_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR /* Check that the object is the correct one */ if(order == H5_ITER_INC) { @@ -13185,7 +13189,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, */ /* Get the address of the root group in the file to mount */ - if(H5Oget_info(mount_file_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(mount_file_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR mnt_root_addr = oi.addr; /* Mount a file over a group in main group */ @@ -13197,7 +13201,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)mnt_idx, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(obj_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR /* Check that the object is the root of the mounted file and not in the previous file */ if(H5F_addr_ne(oi.addr, mnt_root_addr)) TEST_ERROR @@ -13348,7 +13352,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13383,7 +13387,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13525,7 +13529,7 @@ open_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13619,14 +13623,14 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, sprintf(objname, "filler %02u", u); /* Query the object's information, by name */ - if(H5Oget_info_by_name(group_id, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(group_id, objname, &oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR /* Check that the object is the correct one */ if(H5F_addr_ne(oinfo.addr, objno[u])) TEST_ERROR if(H5F_addr_ne(oinfo.num_attrs, u)) TEST_ERROR /* Query the object's information, by index */ - if(H5Oget_info_by_idx(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR /* Check that the object is the correct one */ if(order == H5_ITER_INC) { @@ -13768,7 +13772,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index on empty group */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13784,7 +13788,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -13812,7 +13816,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13832,7 +13836,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -13860,7 +13864,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13965,7 +13969,7 @@ object_info_old(hid_t fapl) /* Check for out of bound query by index on empty group */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13981,7 +13985,7 @@ object_info_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -14009,13 +14013,13 @@ object_info_old(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR /* Check for creation order index query */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -14775,8 +14779,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR @@ -14822,8 +14826,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR @@ -33,6 +33,7 @@ #define H5F_TESTING #include "H5Fpkg.h" +#include "H5CXprivate.h" /* API Contexts */ #include "H5FLprivate.h" #include "H5Iprivate.h" #include "H5VMprivate.h" @@ -257,23 +258,23 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -299,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 @@ -402,16 +403,16 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -434,14 +435,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if(new_ma_addr != ma_addr) TEST_ERROR if(new_ma_size != ma_size) @@ -479,19 +480,19 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -528,14 +529,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -571,14 +572,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if(new_ma_addr != ma_addr) TEST_ERROR if(new_ma_size != ma_size) @@ -683,15 +684,15 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -715,13 +716,13 @@ 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 /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -761,27 +762,27 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); 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) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -917,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 @@ -962,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 @@ -976,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 */ @@ -1032,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)); @@ -1064,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) @@ -1176,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) @@ -1185,10 +1186,10 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1200,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) @@ -1214,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; @@ -1223,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) @@ -1253,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) @@ -1262,10 +1263,10 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1277,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) @@ -1290,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; @@ -1298,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) @@ -1328,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) @@ -1337,10 +1338,10 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1356,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) @@ -1367,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 */ @@ -1379,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. @@ -1501,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) @@ -1510,10 +1511,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1525,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) @@ -1539,10 +1540,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + 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; @@ -1553,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) @@ -1568,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); @@ -1579,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) @@ -1609,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) @@ -1618,10 +1619,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1633,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) @@ -1647,10 +1648,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + 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; @@ -1661,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) @@ -1672,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 */ @@ -1682,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 @@ -1711,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) @@ -1720,10 +1721,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + 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)); @@ -1735,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) @@ -1749,10 +1750,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + 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; @@ -1763,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) @@ -1775,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); @@ -1784,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 @@ -1813,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) @@ -1822,10 +1823,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10)); + 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)); @@ -1837,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) @@ -1851,10 +1852,10 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + 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; @@ -1865,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) @@ -1876,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; @@ -1886,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) @@ -1984,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 @@ -1994,19 +1995,19 @@ 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* Create a section */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)(ma_addr+ma_size), (hsize_t)TBLOCK_SIZE2048); + 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 @@ -2016,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 @@ -2041,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) @@ -2050,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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); + 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) @@ -2075,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 @@ -2168,18 +2169,18 @@ 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); + 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 */ - 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR if(ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50))) @@ -2205,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) @@ -2308,24 +2309,24 @@ 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); + 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3+TBLOCK_SIZE2058) != ma_addr) TEST_ERROR @@ -2353,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 @@ -2465,16 +2466,16 @@ 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); + 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -2483,16 +2484,16 @@ 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); /* info for meta_aggr shouldn't be changed */ if(addr3 != (sdata_addr+sdata_size)) TEST_ERROR @@ -2500,8 +2501,8 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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) TEST_ERROR @@ -2509,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 @@ -2628,9 +2629,9 @@ 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -2639,20 +2640,20 @@ 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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)); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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) TEST_ERROR @@ -2660,27 +2661,27 @@ 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 /* sdata_aggr is reset 0 */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((sdata_addr != 0) && (sdata_size != 0)) TEST_ERROR /* info is unchanged in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if((new_ma_addr != ma_addr) && (new_ma_size != ma_size)) 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 @@ -2776,15 +2777,15 @@ 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); + 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 @@ -2792,8 +2793,8 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + 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 if((addr3+TBLOCK_SIZE1970) != new_ma_addr) TEST_ERROR @@ -2801,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 @@ -2911,15 +2912,15 @@ 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); + 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 @@ -2928,16 +2929,16 @@ 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); + 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if((addr3+TBLOCK_SIZE1970) != new_ma_addr) TEST_ERROR if(addr3 != (sdata_addr+sdata_size)) TEST_ERROR @@ -2956,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 @@ -3077,14 +3078,14 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 @@ -3093,38 +3094,38 @@ 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr2+(TBLOCK_SIZE2048 - TBLOCK_SIZE30)) != sdata_addr) TEST_ERROR 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); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr3+TBLOCK_SIZE50) != sdata_addr) TEST_ERROR if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE50)) TEST_ERROR /* Allocate the third block from meta_aggr */ - addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1970); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 if ((addr3 + TBLOCK_SIZE1970) != ma_addr) TEST_ERROR if (ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE1970)) TEST_ERROR /* sdata_aggr info is reset to 0 */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != HADDR_UNDEF) TEST_ERROR if (sdata_size != 0) TEST_ERROR @@ -3138,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 @@ -3240,8 +3241,8 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 @@ -3252,52 +3253,52 @@ 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) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr+TBLOCK_SIZE50)) TEST_ERROR 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) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr + TBLOCK_SIZE700)) TEST_ERROR 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) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != (addr + TBLOCK_SIZE2058)) TEST_ERROR 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 @@ -3331,15 +3332,15 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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 @@ -3350,12 +3351,12 @@ 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 - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr+TBLOCK_SIZE50)) TEST_ERROR @@ -3366,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 @@ -3401,15 +3402,15 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + 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 @@ -3420,12 +3421,12 @@ 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 - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != addr) TEST_ERROR if (new_ma_size != 0) TEST_ERROR @@ -3434,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 @@ -3531,18 +3532,18 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + 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; if((addr1 + TBLOCK_SIZE30) != new_ma_addr) 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); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != ma_addr) TEST_ERROR @@ -3578,32 +3579,32 @@ 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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 if(ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR /* 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); + 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); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); if(new_sdata_addr != saddr1) TEST_ERROR if(new_sdata_size != sdata_size + TBLOCK_SIZE50) TEST_ERROR /* meta_aggr info should be updated because the block is absorbed into the meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); 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 @@ -3637,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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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)); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + 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); + 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 @@ -3792,13 +3793,13 @@ 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 /* there should be nothing in the aggregator */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(ma_addr || ma_size) TEST_ERROR HDmemset(&state, 0, sizeof(H5FS_stat_t)); @@ -3816,13 +3817,13 @@ 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 /* there should be nothing in the aggregator */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(ma_addr || ma_size) TEST_ERROR if(mis_align) { @@ -3833,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 @@ -3868,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 @@ -3889,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) @@ -3923,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 @@ -3944,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 @@ -4044,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) @@ -4053,10 +4054,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)alignment, (hsize_t)TBLOCK_SIZE50); + 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)); @@ -4068,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 @@ -4082,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; @@ -4107,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) @@ -4116,10 +4117,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE8000); + 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)); @@ -4131,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 @@ -4145,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 @@ -4156,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); @@ -4190,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) @@ -4199,10 +4200,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700); + 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)); @@ -4217,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) @@ -4415,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 @@ -4428,7 +4429,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -4439,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 @@ -4451,7 +4452,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -4461,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 @@ -4473,7 +4474,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE80) != ma_addr) TEST_ERROR @@ -4484,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 @@ -4496,7 +4497,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr4 + TBLOCK_SIZE1970) != ma_addr) TEST_ERROR @@ -4505,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 @@ -4671,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 @@ -4684,7 +4685,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -4694,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 @@ -4706,7 +4707,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -4730,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) { @@ -4742,8 +4743,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Verify that the allocated block is aligned */ if (saddr1 % alignment) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(sdata_addr != (saddr1 + TBLOCK_SIZE30)) TEST_ERROR @@ -4763,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 @@ -4775,7 +4776,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE80) != ma_addr) TEST_ERROR @@ -4791,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 @@ -5010,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 @@ -5023,7 +5024,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5033,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 @@ -5045,7 +5046,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -5068,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 @@ -5080,7 +5081,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if(sdata_addr != (saddr1+TBLOCK_SIZE30)) TEST_ERROR /* calculate fragment for alignment of block 50 in sdata_aggr */ @@ -5089,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 @@ -5101,7 +5102,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if(sdata_addr != (saddr2 + TBLOCK_SIZE50)) TEST_ERROR /* calculate fragment for alignment of block 80 in sdata_aggr */ @@ -5110,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 @@ -5122,7 +5123,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr3 + TBLOCK_SIZE80) != sdata_addr) TEST_ERROR @@ -5132,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 @@ -5156,7 +5157,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE1034) != ma_addr) TEST_ERROR @@ -5315,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 @@ -5328,7 +5329,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); saved_ma_size = ma_size; if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5338,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 @@ -5350,7 +5351,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE2058) != ma_addr) TEST_ERROR @@ -5363,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) { @@ -5526,12 +5527,12 @@ 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 - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5550,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 @@ -5562,7 +5563,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR /* calculate fragment for alignment of block 2058 from meta_aggr */ @@ -5571,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 @@ -5595,12 +5596,12 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) } /* nothing is changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr || new_ma_size != ma_size) TEST_ERROR /* nothing is changed in sdata_aggr */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); if (new_sdata_addr != sdata_addr || new_sdata_size != sdata_size) TEST_ERROR @@ -5790,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 @@ -5803,7 +5804,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5814,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 @@ -5826,7 +5827,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr1+TBLOCK_SIZE30)) TEST_ERROR /* calculate fragment for alignment of block 50 in sdata_aggr */ @@ -5835,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 @@ -5847,7 +5848,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr2+TBLOCK_SIZE50)) TEST_ERROR /* calculate fragment for alignment of block 80 in sdata_aggr */ @@ -5856,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 @@ -5868,7 +5869,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr3+TBLOCK_SIZE80)) TEST_ERROR /* calculate fragment for alignment of block 2058 */ @@ -5878,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 @@ -5890,8 +5891,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (new_ma_addr != ma_addr && new_ma_size != ma_size) TEST_ERROR @@ -6034,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 @@ -6043,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 @@ -6055,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 @@ -6067,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 @@ -6113,21 +6114,21 @@ test_mf_fs_persist_split(void) TESTING("File's free-space managers are persistent for split-file"); - /* for now, we don't support persistant free space managers + /* for now, we don't support persistent free space managers * with the split file driver. */ SKIPPED(); - HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n"); + HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n"); return 0; /* <========== note return */ /* File creation property list template */ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - /* for now, we don't support persistant free space managers + /* for now, we don't support persistent free space managers * with the split file driver. */ SKIPPED(); - HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n"); + HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n"); return 0; /* <========== note return */ /* File creation property list template */ @@ -6160,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) @@ -6208,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 */ @@ -6222,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 @@ -6233,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 */ @@ -6247,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 @@ -6262,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) @@ -6297,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 */ @@ -6309,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 @@ -6337,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 */ @@ -6435,18 +6436,18 @@ test_mf_fs_persist_multi(void) TESTING("File's free-space managers are persistent for multi-file"); - /* for now, we don't support persistant free space managers + /* for now, we don't support persistent free space managers * with the multi file driver. */ SKIPPED(); - HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n"); + HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n"); return 0; /* <========== note return */ - /* for now, we don't support persistant free space managers + /* for now, we don't support persistent free space managers * with the multi file driver. */ SKIPPED(); - HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n"); + HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n"); return 0; /* <========== note return */ /* File creation property list template */ @@ -6477,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) @@ -6525,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 */ @@ -6539,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 @@ -6549,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 */ @@ -6563,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) @@ -6607,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 */ @@ -6619,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 @@ -6633,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 */ @@ -6648,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) @@ -6671,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 @@ -6690,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 */ @@ -6782,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) @@ -6814,7 +6815,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); + H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); /* Verify that H5FD_MEM_SUPER free-space manager is there */ if(!H5F_addr_defined(f->shared->fs_addr[tt])) @@ -6827,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 */ @@ -6847,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 @@ -6874,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 @@ -6963,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) @@ -6995,14 +6996,14 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_alloc_to_fs_type(f, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type); + H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type); /* Verify that the H5FD_MEM_SUPER free-space manager is not there */ if(H5F_addr_defined(f->shared->fs_addr[fs_type])) 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) @@ -7026,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 */ @@ -7052,12 +7053,12 @@ 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, H5AC_ind_read_dxpl_id, (hsize_t)103))) + if(HADDR_UNDEF == (addrx = H5MF_alloc(f, type, (hsize_t)103))) FAIL_STACK_ERROR } @@ -7173,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 @@ -7207,7 +7208,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); + H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); /* Get a pointer to the internal file object */ if(NULL == (f = (H5F_t *)H5I_object(file))) @@ -7345,20 +7346,20 @@ 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); + H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); /* For paged aggregation, the section in the page at EOF for small meta fs is not shrunk away */ if(fs_type == H5F_FSPACE_STRATEGY_PAGE) { @@ -7367,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; @@ -7380,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 */ @@ -7404,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 */ @@ -7502,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 @@ -7661,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); + 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); + 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 @@ -7730,12 +7731,12 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* Verify that the large generic manager is there */ - H5MF_alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type); + H5MF__alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type); if(!H5F_addr_defined(f->shared->fs_addr[fs_type])) TEST_ERROR /* Verify that the small meta data manager is there */ - H5MF_alloc_to_fs_type(f, H5FD_MEM_OHDR, f->shared->fs_page_size - 1, (H5F_mem_page_t *)&fs_type); + H5MF__alloc_to_fs_type(f, H5FD_MEM_OHDR, f->shared->fs_page_size - 1, (H5F_mem_page_t *)&fs_type); if(!H5F_addr_defined(f->shared->fs_addr[fs_type])) TEST_ERROR @@ -7745,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)) @@ -7767,24 +7768,24 @@ 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 - H5MF_alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type); + H5MF__alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type); 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 @@ -7872,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 @@ -7993,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 */ @@ -8012,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 @@ -8147,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 @@ -8290,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) @@ -8298,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) @@ -8325,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) @@ -8343,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) @@ -8445,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 @@ -8464,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 @@ -8479,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 @@ -8490,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]) @@ -8514,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 @@ -8689,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) @@ -8701,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) @@ -8741,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) @@ -8754,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) @@ -8802,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) @@ -8817,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) @@ -8867,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"); @@ -8877,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 */ @@ -8990,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."); @@ -9002,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 d2c0d21..c6230ee 100644 --- a/test/mount.c +++ b/test/mount.c @@ -412,7 +412,7 @@ test_hide(hid_t fapl) FAIL_STACK_ERROR /* Get information about file1:/mnt1/file1 for later */ - if(H5Oget_info_by_name(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file1", &oi1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Build the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -431,7 +431,7 @@ test_hide(hid_t fapl) * The original objects under file1:/mnt1 are still accessible by their * other names. This is a rather stupid test but demonstrates a point. */ - if(H5Oget_info_by_name(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Hard link failed for hidden object."); @@ -490,7 +490,7 @@ test_assoc(hid_t fapl) FAIL_STACK_ERROR /* Get information about the root of file2 */ - if(H5Oget_info(file2, &oi1) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(file2, &oi1, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Create the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -499,7 +499,7 @@ test_assoc(hid_t fapl) * Get info about the mount point -- should be the same as the root group * of file2. */ - if(H5Oget_info_by_name(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); @@ -688,7 +688,7 @@ test_preopen(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(grp, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -752,10 +752,10 @@ test_postopen(hid_t fapl) if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(grp, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Try accessing it from the file */ - if(H5Oget_info_by_name(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Gclose(grp) < 0) FAIL_STACK_ERROR @@ -825,12 +825,12 @@ test_unlink(hid_t fapl) * before the H5Fmount() and thus refers to the mount point itself rather * than the group mounted there. */ - if(H5Oget_info_by_name(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(mnt, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(mnt, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -845,9 +845,9 @@ test_unlink(hid_t fapl) * We should still be able to get to "/file2" of file2 by starting at * `root' which is still open, but not by name. */ - if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(mnt, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -855,7 +855,7 @@ test_unlink(hid_t fapl) TEST_ERROR } /* end if */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(file2, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -943,7 +943,7 @@ test_mvmpt(hid_t fapl) if(H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access something under the new name */ - if(H5Oget_info_by_name(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt_move_b/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt_move_b") < 0) FAIL_STACK_ERROR @@ -1102,18 +1102,18 @@ test_uniformity(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access some things from the file1 handle */ - if(H5Oget_info_by_name(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access the same things from the file2 handle */ - if(H5Oget_info_by_name(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -1170,7 +1170,7 @@ test_close(hid_t fapl) * still accessible through the file2 handle. */ if(H5Fclose(file1) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) { H5_FAILED(); puts(" File1 contents are not accessible!"); TEST_ERROR @@ -1191,7 +1191,7 @@ test_close(hid_t fapl) * Close file2. It is not actually closed because it's a child of file1. */ if(H5Fclose(file2) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Fclose(file1) < 0) FAIL_STACK_ERROR /* Check that all file IDs have been closed */ @@ -2495,9 +2495,9 @@ test_fcdegree_strong(hid_t fapl) TEST_ERROR /* Check that objects are still open */ - if(H5Oget_info(gidA, &oinfo) < 0) + if(H5Oget_info2(gidA, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gidAM, &oinfo) < 0) + if(H5Oget_info2(gidAM, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Close file #2 (should close open objects also) */ @@ -2506,12 +2506,12 @@ test_fcdegree_strong(hid_t fapl) /* Check that objects are closed */ H5E_BEGIN_TRY { - ret = H5Oget_info(gidA, &oinfo); + ret = H5Oget_info2(gidA, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; if(ret >= 0) TEST_ERROR H5E_BEGIN_TRY { - ret = H5Oget_info(gidAM, &oinfo); + ret = H5Oget_info2(gidAM, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; if(ret >= 0) TEST_ERROR diff --git a/test/mtime.c b/test/mtime.c index 38e3960..80730eb 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -90,9 +90,9 @@ main(void) */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR; - if(H5Oget_info_by_name(file, "dset", &oi1, H5P_DEFAULT) < 0) TEST_ERROR; + if(H5Oget_info_by_name2(file, "dset", &oi1, H5O_INFO_BASIC|H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if((dset = H5Dopen2(file, "dset", H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Oget_info(dset, &oi2) < 0) TEST_ERROR; + if(H5Oget_info2(dset, &oi2, H5O_INFO_BASIC|H5O_INFO_TIME) < 0) TEST_ERROR; if(H5Dclose(dset) < 0) TEST_ERROR; if(H5Fclose(file) < 0) TEST_ERROR; @@ -134,12 +134,12 @@ main(void) file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/Dataset1", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if(oi1.ctime != MTIME1) { H5_FAILED(); /* If this fails, examine H5Omtime.c. Modification time is very - * system dependant (e.g., on Windows DST must be hardcoded). */ + * system dependent (e.g., on Windows DST must be hardcoded). */ puts(" Old modification time incorrect"); goto error; } @@ -164,7 +164,7 @@ main(void) file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/Dataset1", &oi2, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if(oi2.ctime != MTIME2) { H5_FAILED(); diff --git a/test/objcopy.c b/test/objcopy.c index e88d508..18de027 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -145,7 +145,6 @@ const char *FILENAME[] = { #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_DSET_NULL "DSET_NULL" #define NAME_BUF_SIZE 1024 #define ATTR_NAME_LEN 80 @@ -878,10 +877,10 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) cpy_flags = 0; /* Check the number of attributes on source dataset */ - if(H5Oget_info(oid, &oinfo1) < 0) TEST_ERROR + if(H5Oget_info2(oid, &oinfo1, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR /* Check the number of attributes on destination dataset */ - if(H5Oget_info(oid2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(oid2, &oinfo2, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR if(cpy_flags & H5O_COPY_WITHOUT_ATTR_FLAG) { /* Check that the destination has no attributes */ @@ -1072,8 +1071,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -1130,8 +1129,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -1424,8 +1423,8 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) H5O_info_t oinfo, oinfo2; /* Object info */ /* Compare some pieces of the object info */ - if(H5Oget_info_by_name(gid, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(gid2, objname2, &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(gid, objname, &oinfo, H5O_INFO_BASIC|H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(gid2, objname2, &oinfo2, H5O_INFO_BASIC|H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR if(oinfo.type != oinfo2.type) TEST_ERROR if(oinfo.rc != oinfo2.rc) TEST_ERROR @@ -1950,8 +1949,8 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap if(H5Tcommitted(tid) != TRUE) TEST_ERROR /* verify that the addresses of the datatypes are the same */ - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(tid2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(tid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.fileno != oinfo2.fileno || oinfo.addr != oinfo2.addr) FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype") @@ -10332,28 +10331,28 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC1 committed dtype, get address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open SRC1 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open SRC2 committed dtype, check address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open SRC2 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10386,7 +10385,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC1 dset dtype, get address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10394,7 +10393,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC2 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10566,28 +10565,28 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 source committed dtype, get address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 1 source dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open group 1 committed dtype, check address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 1 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10595,7 +10594,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 source committed dtype, get address and make sure it is * different from group 1 source committed dtype */ if((tid = H5Topen2(fid, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -10603,21 +10602,21 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 source dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open group 2 committed dtype, check address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 2 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10645,7 +10644,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 source dset dtype, get address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10653,7 +10652,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10662,7 +10661,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo * different from group 1 source dset dtype */ if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -10671,7 +10670,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10838,14 +10837,14 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10876,28 +10875,28 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset 2 dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11073,7 +11072,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open attribute dtype, get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_TOP, "attr", H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11081,7 +11080,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11332,13 +11331,13 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* get address of committed datatype at root group */ if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP "/" ROOT_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr_int = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype at /g0 */ if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr_short = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -11352,7 +11351,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11360,7 +11359,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11372,7 +11371,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* get address of committed datatype at /g0 */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11386,7 +11385,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11394,7 +11393,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11409,7 +11408,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Open attribute with anon ndt (short), get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_SHORT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11417,7 +11416,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Open attribute with anon ndt (int), get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_INT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11432,7 +11431,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11440,7 +11439,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11643,50 +11642,50 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds */ /* 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 - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_double */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_float */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_float */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_int */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_int */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_short */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* open attribute; get its dtype; get dtype's address: /src_root/src_ndt_double/dst_attr */ if((aid = H5Aopen_by_name(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11817,13 +11816,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open committed dtype "/dst_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/uncopied/src_ndt_int" */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11850,13 +11849,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open committed dtype "/uncopied/src_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/src_ndt_int" */ if((tid = H5Topen2(fid_dst, SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11888,13 +11887,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/uncopied/src_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/src_ndt_int2" */ if((tid = H5Topen2(fid_dst, SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11922,13 +11921,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/dst_dt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/uncopied/src_ndt_int2" */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -12078,14 +12077,14 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/dst_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of datatype for the copied dataset: "/uncopied/src_ndt_dset" */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12114,7 +12113,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype dataset "/uncopied/src_ndt_dset", get its datatype address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12122,7 +12121,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: "/src_ndt_dset" */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12156,7 +12155,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open the copied dataset: /uncopied/src_ndt_dset", get its address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12164,7 +12163,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: "/src_ndt_dset2" */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12194,7 +12193,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open the copied dataset: "/src_ndt_dset", get its datatype address */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12202,7 +12201,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: /uncopied/src_ndt_dset2 */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12862,14 +12861,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12910,14 +12909,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open copied dataset and its dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12949,28 +12948,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -13009,28 +13008,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR diff --git a/test/ohdr.c b/test/ohdr.c index ab50a5f5..146245f 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -31,6 +31,8 @@ #define H5G_FRIEND /*suppress error about including H5Gpkg */ #include "H5Gpkg.h" +#include "H5CXprivate.h" /* API Contexts */ + const char *FILENAME[] = { "ohdr", NULL @@ -84,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) @@ -143,7 +145,6 @@ test_cont(char *filename, hid_t fapl) PASSED(); - return SUCCEED; error: @@ -169,7 +170,6 @@ test_ohdr_cache(char *filename, hid_t fapl) { 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 */ H5HL_t *lheap, *lheap2, *lheap3; /* Pointer to local heaps */ @@ -195,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 @@ -210,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) */ @@ -243,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) */ @@ -265,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 */ @@ -282,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 @@ -389,7 +383,7 @@ test_ohdr_swmr(hbool_t new_format) FAIL_STACK_ERROR /* Get the object information */ - if(H5Oget_info(did, &obj_info) < 0) + if(H5Oget_info2(did, &obj_info, H5O_INFO_HDR) < 0) FAIL_STACK_ERROR if(new_format) @@ -741,40 +735,40 @@ error: #define STR_EARLIEST "earliest" #define STR_V18 "v18" #define STR_LATEST "latest" -char *version_string(H5F_libver_t libver) +static char * +version_string(H5F_libver_t libver) { char *str = NULL; str = (char *) HDmalloc(20); - if (str == NULL) - { - fprintf(stderr, "Allocation failed\n"); - exit(1); + if (str == NULL) { + HDfprintf(stderr, "Allocation failed\n"); + HDexit(1); } switch(libver) { case H5F_LIBVER_EARLIEST: - strcpy(str, STR_EARLIEST); + HDstrcpy(str, STR_EARLIEST); break; case H5F_LIBVER_V18: - strcpy(str, STR_V18); + HDstrcpy(str, STR_V18); break; case H5F_LIBVER_V110: HDassert(H5F_LIBVER_LATEST == H5F_LIBVER_V110); - strcpy(str, STR_LATEST); + HDstrcpy(str, STR_LATEST); break; case H5F_LIBVER_ERROR: case H5F_LIBVER_NBOUNDS: default: - sprintf(str, "%ld", (long)libver); + HDsprintf(str, "%ld", (long)libver); break; } /* end switch */ /* Return the formed version bound string */ - return(str); + return str; } /* end of version_string */ @@ -806,9 +800,9 @@ main(void) H5O_loc_t oh_loc; /* Object header locations */ H5F_libver_t low, high; /* File format bounds */ time_t time_new, ro; - unsigned b; /* Index for "new format" loop */ 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 */ @@ -816,6 +810,10 @@ main(void) fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + /* Push API context */ + if(H5CX_push() < 0) FAIL_STACK_ERROR + api_ctx_pushed = TRUE; + /* 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++) { @@ -860,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 @@ -886,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 @@ -916,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 @@ -960,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(); @@ -973,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(); @@ -990,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(); @@ -1045,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; @@ -1055,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 853ef93..3c61ab0 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -21,9 +21,6 @@ #include "h5test.h" -#include "H5PBprivate.h" -#include "H5Iprivate.h" - /* * This file needs to access private information from the H5F package. */ @@ -34,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 @@ -570,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; @@ -618,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 */ + /* initialize 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 @@ -634,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 ++; @@ -646,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) @@ -656,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; @@ -665,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; @@ -673,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) { @@ -693,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) { @@ -708,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) { @@ -721,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) { @@ -746,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; @@ -763,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) @@ -772,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) { @@ -904,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 */ + /* initialize 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 @@ -921,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 ++; @@ -935,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; @@ -964,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; @@ -972,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) { @@ -999,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) { @@ -1030,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) @@ -1178,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 @@ -1192,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; @@ -1216,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) @@ -1244,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) @@ -1312,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 @@ -1324,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; @@ -1347,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) @@ -1375,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) @@ -1439,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 */ + /* initialize 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; @@ -1483,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) @@ -1504,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) @@ -1517,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) @@ -1533,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) @@ -1566,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 */ + /* initialize 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; @@ -1607,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) @@ -1623,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) @@ -1648,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) @@ -1663,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) @@ -1805,99 +1800,99 @@ 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; - /* intialize all the elements to have a value of -1 */ + /* initialize 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; 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) @@ -2142,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(); @@ -2167,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."); @@ -2187,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" : ""); @@ -2200,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/stab.c b/test/stab.c index 97abc16..37097b7 100644 --- a/test/stab.c +++ b/test/stab.c @@ -419,7 +419,7 @@ lifecycle(hid_t fcpl, hid_t fapl2) if(H5G__is_new_dense_test(gid) != FALSE) TEST_ERROR /* Check that the object header is only one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 0) TEST_ERROR if(oinfo.hdr.nmesgs != 6) TEST_ERROR @@ -441,7 +441,7 @@ lifecycle(hid_t fcpl, hid_t fapl2) if(H5G__is_new_dense_test(gid) != TRUE) TEST_ERROR /* Check that the object header is still one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 92) TEST_ERROR if(oinfo.hdr.nmesgs != 3) TEST_ERROR @@ -1141,7 +1141,7 @@ error: } H5E_END_TRY; return 1; -} /* end old_api() */ +} /* end corrupt_stab_msg() */ /*------------------------------------------------------------------------- diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index 2d5c3f9..af4b743 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -40,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); @@ -212,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/tattr.c b/test/tattr.c index 525898d..4358d4c 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -136,6 +136,13 @@ float attr_data5=-5.123F; /* Test data for 5th attribute */ #define BUG3_DT_NAME "dt" #define BUG3_ATTR_NAME "attr" +/* Used by test_attr_delete_last_dense() */ +#define GRPNAME "grp" +#define ATTRNAME "attr" +#define DIM0 100 +#define DIM1 100 +#define RANK 2 + /* Attribute iteration struct */ typedef struct { H5_iter_order_t order; /* Direction of iteration */ @@ -422,7 +429,7 @@ test_attr_basic_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -451,7 +458,7 @@ test_attr_basic_read(hid_t fapl) CHECK(group, FAIL, "H5Gopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -793,7 +800,7 @@ test_attr_compound_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -997,7 +1004,7 @@ test_attr_scalar_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1200,7 +1207,7 @@ test_attr_mult_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1457,7 +1464,7 @@ test_attr_iterate(hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1475,7 +1482,7 @@ test_attr_iterate(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1522,7 +1529,7 @@ test_attr_delete(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1531,7 +1538,7 @@ test_attr_delete(hid_t fapl) VERIFY(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1540,7 +1547,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -1577,7 +1584,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1600,7 +1607,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1665,7 +1672,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Tcommit2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); @@ -1678,7 +1685,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(dset_id, FAIL, "H5Dcreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); @@ -1687,7 +1694,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1700,7 +1707,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); @@ -1709,7 +1716,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1764,7 +1771,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Dclose"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1773,7 +1780,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Ldelete"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); @@ -2464,7 +2471,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2646,7 +2653,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Arename_by_name"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2798,7 +2805,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -8161,8 +8168,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; @@ -8175,13 +8182,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; @@ -8189,9 +8196,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 */ @@ -8213,8 +8220,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; @@ -8227,13 +8234,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; @@ -8241,9 +8248,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 */ @@ -8492,8 +8499,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; @@ -8506,13 +8513,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; @@ -8520,9 +8527,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 */ @@ -8544,8 +8551,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; @@ -8558,13 +8565,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; @@ -8572,9 +8579,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 */ @@ -8605,18 +8612,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 */ @@ -8629,18 +8636,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 */ @@ -8661,18 +8668,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 */ @@ -8685,18 +8692,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 */ @@ -8938,8 +8945,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; @@ -8952,13 +8959,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; @@ -8966,9 +8973,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 */ @@ -8990,8 +8997,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; @@ -9004,13 +9011,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; @@ -9018,8 +9025,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 */ @@ -9054,18 +9061,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 */ @@ -9307,8 +9314,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; @@ -9321,13 +9328,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; @@ -9335,9 +9342,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 */ @@ -9359,8 +9366,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; @@ -9373,13 +9380,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; @@ -9387,9 +9394,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 */ @@ -9433,18 +9440,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 */ @@ -10484,7 +10491,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gcreate2"); /* Get root group address */ - ret = H5Oget_info(fid, &oinfo); + ret = H5Oget_info2(fid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); root_addr = oinfo.addr; @@ -10509,7 +10516,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gopen2"); oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT); CHECK(oid, FAIL, "H5Oopen"); - ret = H5Oget_info(oid, &oinfo); + ret = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); if(oinfo.addr != root_addr) TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr); @@ -10554,7 +10561,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gopen2"); oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT); CHECK(oid, FAIL, "H5Oopen"); - ret = H5Oget_info(oid, &oinfo); + ret = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); if(oinfo.addr != root_addr) TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr); @@ -10672,6 +10679,92 @@ test_attr_bug9(hid_t fcpl, hid_t fapl) /**************************************************************** ** +** test_attr_delete_dense(): +** This is to verify the error as described in HDFFV-9277 +** is fixed when deleting the last "large" attribute that +** is stored densely. +** +****************************************************************/ +static void +test_attr_delete_last_dense(hid_t fcpl, hid_t fapl) +{ + hid_t fid; /* File ID */ + hid_t gid; /* Group ID */ + hid_t aid; /* Attribute ID */ + hid_t sid; /* Dataspace ID */ + hsize_t dim2[2] = {DIM0, DIM1}; /* Dimension sizes */ + int i, j; /* Local index variables */ + double *data = NULL; /* Pointer to the data buffer */ + herr_t ret; /* Generic return status */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Deleting the last large attribute stored densely\n")); + + /* Create the file */ + fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create the group */ + gid = H5Gcreate2(fid, GRPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gcreate"); + + /* Create the dataspace */ + sid = H5Screate_simple(RANK, dim2, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Attach the attribute to the group */ + aid = H5Acreate2(gid, ATTRNAME, H5T_IEEE_F64LE, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Allocate the data buffer */ + data = (double *)HDmalloc((size_t)(DIM0 * DIM1) * sizeof(double)); + CHECK_PTR(data, "HDmalloc"); + + /* Initialize the data */ + for(i = 0; i < DIM0; i++) + for(j = 0; j < DIM1; j++) + *(data + i * DIM1 + j) = i + j; + + /* Write to the attribute */ + ret = H5Awrite(aid, H5T_NATIVE_DOUBLE, data); + CHECK(ret, FAIL, "H5Awrite"); + + /* Closing */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Re-open the file */ + fid = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); + CHECK(fid, FAIL, "H5Fopen"); + + /* Open the group */ + gid = H5Gopen2(fid, GRPNAME, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gopen"); + + /* Delete the attribute */ + ret = H5Adelete(gid, ATTRNAME); + CHECK(ret, FAIL, "H5Adelete"); + + /* Closing */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Free the data buffer */ + if(data) + HDfree(data); + +} /* test_attr_delete_last_dense() */ + +/**************************************************************** +** ** test_attr(): Main H5A (attribute) testing routine. ** ****************************************************************/ @@ -10819,6 +10912,7 @@ test_attr(void) 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 */ + test_attr_delete_last_dense(my_fcpl, my_fapl); /* Test */ } /* end for */ } /* end if */ else { diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1 index d471e13..8190665 100644 --- a/test/testfiles/err_compat_1 +++ b/test/testfiles/err_compat_1 @@ -54,6 +54,6 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed major: Error API minor: Write failed - #002: (file name) line (number) in H5Dwrite(): not a dataset + #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1 index 5b68002..02cfed8 100644 --- a/test/testfiles/error_test_1 +++ b/test/testfiles/error_test_1 @@ -21,7 +21,7 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): Testing error API based on data I/O HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dwrite(): not a dataset + #000: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): @@ -32,7 +32,7 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): major: Error in IO minor: Error in H5Dwrite HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #002: (file name) line (number) in H5Dwrite(): not a dataset + #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type @@ -48,7 +48,7 @@ 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 diff --git a/test/testfiles/plist_files/def_dxpl_32be b/test/testfiles/plist_files/def_dxpl_32be Binary files differindex 3b77a32..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_32be +++ b/test/testfiles/plist_files/def_dxpl_32be diff --git a/test/testfiles/plist_files/def_dxpl_32le b/test/testfiles/plist_files/def_dxpl_32le Binary files differindex 3b77a32..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_32le +++ b/test/testfiles/plist_files/def_dxpl_32le diff --git a/test/testfiles/plist_files/def_dxpl_64be b/test/testfiles/plist_files/def_dxpl_64be Binary files differindex 3b77a32..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_64be +++ b/test/testfiles/plist_files/def_dxpl_64be diff --git a/test/testfiles/plist_files/def_dxpl_64le b/test/testfiles/plist_files/def_dxpl_64le Binary files differindex 3b77a32..b13f456 100644 --- a/test/testfiles/plist_files/def_dxpl_64le +++ b/test/testfiles/plist_files/def_dxpl_64le diff --git a/test/testfiles/plist_files/dxpl_32be b/test/testfiles/plist_files/dxpl_32be Binary files differindex 22fbdc8..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_32be +++ b/test/testfiles/plist_files/dxpl_32be diff --git a/test/testfiles/plist_files/dxpl_32le b/test/testfiles/plist_files/dxpl_32le Binary files differindex 22fbdc8..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_32le +++ b/test/testfiles/plist_files/dxpl_32le diff --git a/test/testfiles/plist_files/dxpl_64be b/test/testfiles/plist_files/dxpl_64be Binary files differindex 22fbdc8..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_64be +++ b/test/testfiles/plist_files/dxpl_64be diff --git a/test/testfiles/plist_files/dxpl_64le b/test/testfiles/plist_files/dxpl_64le Binary files differindex 22fbdc8..5ff2ea0 100644 --- a/test/testfiles/plist_files/dxpl_64le +++ b/test/testfiles/plist_files/dxpl_64le diff --git a/test/tfile.c b/test/tfile.c index 200f221..ad7f87f 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -181,8 +181,6 @@ 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 FILE8 "tfile8.h5" /* Test file */ - #define DSET_NULL "DSET_NULL" #define DSET "DSET" #define DSETA "DSETA" @@ -4893,7 +4891,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, /* * Make sure the root group has the correct object header version */ - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -4909,7 +4907,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, file = H5Fopen("tfile5.h5", H5F_ACC_RDWR, fapl); CHECK(file, FAIL, "H5Fopen"); - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -4920,7 +4918,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, group = H5Gcreate2(file, "/G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate"); - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info"); @@ -4934,7 +4932,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, group = H5Gcreate2(file, "/G1/G3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate"); - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info_by_name"); @@ -4944,7 +4942,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, /* * Make sure the root group still has the correct object header version */ - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -5642,7 +5640,7 @@ test_libver_bounds_obj(hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Get root group's object info */ - ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version is 2 because shared message is enabled */ @@ -5661,7 +5659,7 @@ test_libver_bounds_obj(hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Get root group's object info */ - ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version is as indicated by low_bound */ @@ -5716,7 +5714,7 @@ test_libver_bounds_obj(hid_t fapl) 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); + ret = H5Oget_info_by_name2(gid, GRP_NAME, &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version as indicated by low_bound */ @@ -6935,7 +6933,7 @@ test_libver_macros2(void) ** ****************************************************************/ static void -test_incr_filesize(const char *env_h5_drvr) +test_incr_filesize(void) { hid_t fid; /* File opened with read-write permission */ h5_stat_size_t filesize; /* Size of file when empty */ @@ -7337,7 +7335,7 @@ test_file(void) 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(env_h5_drvr); /* Test H5Fincrement_filesize() and H5Fget_eoa() */ + test_incr_filesize(); /* Test H5Fincrement_filesize() and H5Fget_eoa() */ #ifndef H5_NO_DEPRECATED_SYMBOLS test_deprec(); /* Test deprecated routines */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/test/th5o.c b/test/th5o.c index 00d706c..63fee5f 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -410,13 +410,13 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Sclose"); /* Get ref counts for each object. They should all be 1, since each object has a hard link. */ - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -429,13 +429,13 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Oincr_refcount"); /* Get ref counts for each object. They should all be 2 now. */ - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); @@ -447,13 +447,13 @@ test_h5o_refcount(void) ret = H5Odecr_refcount(dset); CHECK(ret, FAIL, "H5Odecr_refcount"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -485,13 +485,13 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); @@ -523,13 +523,13 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -1272,9 +1272,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, through group IDs */ - ret = H5Oget_info(gid1, &oinfo1); + ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(gid2, &oinfo2); + ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1284,9 +1284,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, by name */ - ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1317,9 +1317,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, through group IDs */ - ret = H5Oget_info(gid1, &oinfo1); + ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(gid2, &oinfo2); + ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1329,9 +1329,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, by name */ - ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1348,6 +1348,136 @@ test_h5o_getinfo_same_file(void) } /* test_h5o_getinfo_same_file() */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + +/**************************************************************** +** +** visit_obj_cb(): +** This is the callback function invoked by H5Ovisit1() in +** test_h5o_getinfo_visit(): +** --Verify that the object info returned to the callback +** function is the same as H5Oget_info2(). +** +****************************************************************/ +static int +visit_obj_cb(hid_t group_id, const char *name, const H5O_info_t *oinfo1, + void H5_ATTR_UNUSED *_op_data) +{ + H5O_info_t oinfo2; /* Object info structs */ + + /* Verify the object info for "group1", "group2" and the root group */ + if(!(HDstrcmp(name, "group1"))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT); + VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1"); + } else if(!(HDstrcmp(name, "group2"))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT); + VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2"); + VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2"); + } else if(!(HDstrcmp(name, "."))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT); + VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Ovisit1/H5Oget_info2"); + VERIFY(oinfo1->meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Ovisit1/H5Oget_info2"); + } + + return(H5_ITER_CONT); +} /* end visit_obj_cb() */ + + +/**************************************************************** +** +** test_h5o_getinfo_visit(): +** Verify that the object info returned via H5Oget_info1() +** and H5Oget_info2() are the same. +** Verify that the object info retrieved via H5Ovisit1() is +** the same as H5Oget_info2(). +** +****************************************************************/ +static void +test_h5o_getinfo_visit(void) +{ + hid_t fid = -1; /* HDF5 File ID */ + hid_t gid1 = -1, gid2 = -1; /* Group IDs */ + hid_t sid = -1; /* Dataspace ID */ + hid_t aid = -1; /* Attribute ID */ + H5O_info_t oinfo1, oinfo2; /* Object info structs */ + char attrname[25]; /* Attribute name */ + int j; /* Local index variable */ + herr_t ret; /* Value returned from API calls */ + + /* Create an HDF5 file */ + fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create "group1" in the file */ + gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid1, FAIL, "H5Gcreate2"); + + /* Create dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Attach 10 attributes to "group1" */ + for(j = 0; j <10; j++) { + /* Create the attribute name */ + sprintf(attrname, "attr%u", j); + /* Create the attribute */ + aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + } + + /* Create "group2" in the file */ + gid2 = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid2, FAIL, "H5Gcreate2"); + + /* Reset object info */ + HDmemset(&oinfo1, 0, sizeof(oinfo1)); + HDmemset(&oinfo2, 0, sizeof(oinfo2)); + + /* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */ + ret = H5Oget_info1(gid1, &oinfo1); + CHECK(ret, FAIL, "H5Oget_info"); + ret = H5Oget_info2(gid1, &oinfo2, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS); + CHECK(ret, FAIL, "H5Oget_info"); + + /* Verify the object info for "group1" is correct */ + VERIFY(oinfo1.fileno, oinfo2.fileno, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2"); + + /* Reset object info */ + HDmemset(&oinfo1, 0, sizeof(oinfo1)); + HDmemset(&oinfo2, 0, sizeof(oinfo2)); + + /* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */ + ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + ret = H5Oget_info_by_name2(fid, "group2", &oinfo2, H5O_INFO_HDR|H5O_INFO_META_SIZE, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + + /* Verify the object info for "group2" is correct */ + VERIFY(oinfo1.hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Oget_info1/2"); + + /* Close everything */ + ret = H5Gclose(gid1); + CHECK(ret, FAIL, "H5Gclose"); + ret = H5Gclose(gid2); + CHECK(ret, FAIL, "H5Gclose"); + + /* Verify the object info returned to the callback function is correct */ + ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, NULL); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + +} /* test_h5o_getinfo_visit() */ + +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /**************************************************************** @@ -1370,6 +1500,9 @@ test_h5o(void) test_h5o_comment(); /* Test routines for comment */ test_h5o_comment_by_name(); /* Test routines for comment by name */ test_h5o_getinfo_same_file(); /* Test info for objects in the same file */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + test_h5o_getinfo_visit(); /* Test object info for H5Oget_info1/2 and H5Ovisit1 */ +#endif } /* test_h5o() */ @@ -324,7 +324,7 @@ static int id_predefined_test(void ) out: if(typeID != H5I_INVALID_HID) H5Tclose(typeID); - if(testObj != NULL) + if(testObj != NULL) HDfree(testObj); return -1; diff --git a/test/titerate.c b/test/titerate.c index 82c26eb..de652a7 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -213,7 +213,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end for */ @@ -239,7 +239,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end for */ @@ -553,7 +553,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_ /* * Get type of the object and check it. */ - ret = H5Oget_info_by_name(loc_id, name, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(loc_id, name, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); if(test_info->type != oinfo.type) { @@ -797,7 +797,7 @@ static void test_grp_memb_funcs(hid_t fapl) obj_names[i] = HDstrdup(dataset_name); 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); + ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); if(!HDstrcmp(dataset_name, "grp")) @@ -891,7 +891,7 @@ static void test_links(hid_t fapl) /* Get object type */ if(linfo.type == H5L_TYPE_HARD) { - ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end if */ diff --git a/test/tmisc.c b/test/tmisc.c index 4a77b51..1e62302 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -674,11 +674,11 @@ test_misc4(void) CHECK(group3, FAIL, "H5Gcreate2"); /* Get the stat information for each group */ - ret = H5Oget_info_by_name(file1, MISC4_GROUP_1, &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file1, MISC4_GROUP_1, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(file1, MISC4_GROUP_2, &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file1, MISC4_GROUP_2, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(file2, MISC4_GROUP_1, &oinfo3, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file2, MISC4_GROUP_1, &oinfo3, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify that the fileno values are the same for groups from file1 */ @@ -2929,7 +2929,7 @@ test_misc18(void) CHECK(did1, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); @@ -2942,7 +2942,7 @@ test_misc18(void) CHECK(did2, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); @@ -2975,7 +2975,7 @@ test_misc18(void) } /* end for */ /* Get object information for dataset #1 now */ - ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); @@ -2984,7 +2984,7 @@ test_misc18(void) VERIFY(oinfo.num_attrs, 10, "H5Oget_info_by_name"); /* Get object information for dataset #2 now */ - ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); @@ -3958,7 +3958,7 @@ test_misc23(void) tmp_id = H5Gopen2(file_id, "/A/B01", H5P_DEFAULT); CHECK(tmp_id, FAIL, "H5Gopen2"); - status = H5Oget_info(tmp_id, &oinfo); + status = H5Oget_info2(tmp_id, &oinfo, H5O_INFO_BASIC); CHECK(status, FAIL, "H5Oget_info"); VERIFY(oinfo.rc, 1, "H5Oget_info"); @@ -5238,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_name2(loc_id, name, &object_info, H5O_INFO_BASIC, H5P_DEFAULT); } static int @@ -5499,24 +5499,24 @@ test_misc33(void) MESSAGE(5, ("Testing that bad offset into the heap returns error")); /* Open the test file */ - fid = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT); + fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); /* Case (1) */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_name(fid, "/soft_two", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/soft_two", &oinfo, H5O_INFO_BASIC, 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); + ret = H5Oget_info_by_name2(fid, "/dsetA", &oinfo, H5O_INFO_BASIC, 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); + ret = H5Oget_info_by_name2(fid, "/soft_one", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Oget_info_by_name"); diff --git a/test/trefer.c b/test/trefer.c index 55172c0..b7a1d59 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -1495,7 +1495,7 @@ test_reference_group(void) CHECK(size, FAIL, "H5Lget_name_by_idx"); VERIFY_STR(objname, DSETNAME2, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Oget_info_by_idx"); diff --git a/test/tselect.c b/test/tselect.c index 2022a11..3c93e7a 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -1644,8 +1644,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, /* Advance to next element */ cube_ptr++; expected_value++; - s++; - m++; + s++; + m++; } while((cube_rank > 0) && (m < edge_size)); l++; } while((cube_rank > 1) && (l < edge_size)); @@ -1662,10 +1662,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, /**************************************************************** ** -** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace) -** selection code with contiguous source and target having +** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace) +** selection code with contiguous source and target having ** different ranks but the same shape. We have already -** tested H5S_shape_same in isolation, so now we try to do +** tested H5S_shape_same in isolation, so now we try to do ** I/O. ** ****************************************************************/ @@ -1769,13 +1769,13 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, CHECK(file_large_cube_sid, FAIL, "H5Screate_simple"); /* if chunk edge size is greater than zero, set up the small and - * large data set creation property lists to specify chunked + * large data set creation property lists to specify chunked * datasets. */ if(chunk_edge_size > 0) { hsize_t chunk_dims[SS_DR_MAX_RANK]; /* Chunk dimensions */ - chunk_dims[0] = chunk_dims[1] = + chunk_dims[0] = chunk_dims[1] = chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = (hsize_t)chunk_edge_size; small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE); @@ -1799,7 +1799,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } /* end if */ /* create the small cube dataset */ - small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type, + small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type, small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT); CHECK(small_cube_dataset, FAIL, "H5Dcreate2"); @@ -1810,7 +1810,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } /* end if */ /* create the large cube dataset */ - large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type, + large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type, file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT); CHECK(large_cube_dataset, FAIL, "H5Dcreate2"); @@ -1822,16 +1822,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, /* write initial data to the on disk datasets */ - ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, + ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, small_cube_sid, xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); - ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, + ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, file_large_cube_sid, xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); /* read initial data from disk and verify that it is as expected. */ - ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, + ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, small_cube_sid, xfer_plist, small_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -1839,7 +1839,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, verify_select_hyper_contig_dr__run_test(small_cube_buf_1, small_cube_size, edge_size, small_rank); - ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, + ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, file_large_cube_sid, xfer_plist, large_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -1852,12 +1852,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, * of different rank that H5S_select_shape_same() views as being of the * same shape. * - * Start by reading small_rank-D slice from the on disk large cube, and - * verifying that the data read is correct. Verify that H5S_select_shape_same() + * Start by reading small_rank-D slice from the on disk large cube, and + * verifying that the data read is correct. Verify that H5S_select_shape_same() * returns true on the memory and file selections. */ - + /* set up start, stride, count, and block -- note that we will * change start[] so as to read slices of the large cube. */ @@ -1889,18 +1889,18 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, start[3] = (hsize_t)x; start[4] = (hsize_t)0; - ret = H5Sselect_hyperslab(file_large_cube_sid, + ret = H5Sselect_hyperslab(file_large_cube_sid, H5S_SELECT_SET, - start_ptr, - stride_ptr, - count_ptr, + start_ptr, + stride_ptr, + count_ptr, block_ptr); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(small_cube_sid, + check = H5S_select_shape_same_test(small_cube_sid, file_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); @@ -1937,7 +1937,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } while((large_rank >= 4) && (small_rank <= 3) && (v < edge_size)); u++; } while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size)); - + /* similarly, read the on disk small cube into slices through the in memory * large cube, and verify that the correct data (and only the correct data) @@ -1965,19 +1965,19 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, start[3] = (hsize_t)x; start[4] = (hsize_t)0; - ret = H5Sselect_hyperslab(mem_large_cube_sid, + ret = H5Sselect_hyperslab(mem_large_cube_sid, H5S_SELECT_SET, - start_ptr, - stride_ptr, - count_ptr, + start_ptr, + stride_ptr, + count_ptr, block_ptr); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(small_cube_sid, + check = H5S_select_shape_same_test(small_cube_sid, mem_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); @@ -1992,7 +1992,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, CHECK(ret, FAIL, "H5Dread"); - /* verify that the expected data and only the + /* verify that the expected data and only the * expected data was read. */ start_index = (u * edge_size * edge_size * edge_size * edge_size) + @@ -2028,7 +2028,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, /* Zero out the buffer for the next pass */ HDmemset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t)); - + x++; } while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size)); w++; @@ -2039,16 +2039,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size)); - /* now we go in the opposite direction, verifying that we can write - * from memory to file using selections of different rank that + /* now we go in the opposite direction, verifying that we can write + * from memory to file using selections of different rank that * H5S_select_shape_same() views as being of the same shape. * - * Start by writing small_rank D slices from the in memory large cube, to + * Start by writing small_rank D slices from the in memory large cube, to * the the on disk small cube dataset. After each write, read the small * cube dataset back from disk, and verify that it contains the expected - * data. Verify that H5S_select_shape_same() returns true on the + * data. Verify that H5S_select_shape_same() returns true on the * memory and file selections. - */ + */ u = 0; do { @@ -2064,15 +2064,15 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, */ /* zero out the on disk small cube */ - ret = H5Dwrite(small_cube_dataset, - H5T_NATIVE_UINT16, - small_cube_sid, - small_cube_sid, - xfer_plist, + ret = H5Dwrite(small_cube_dataset, + H5T_NATIVE_UINT16, + small_cube_sid, + small_cube_sid, + xfer_plist, zero_buf); CHECK(ret, FAIL, "H5Dwrite"); - /* select the portion of the in memory large cube from which we + /* select the portion of the in memory large cube from which we * are going to write data. */ start[0] = (hsize_t)u; @@ -2081,40 +2081,40 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, start[3] = (hsize_t)x; start[4] = (hsize_t)0; - ret = H5Sselect_hyperslab(mem_large_cube_sid, + ret = H5Sselect_hyperslab(mem_large_cube_sid, H5S_SELECT_SET, - start_ptr, - stride_ptr, - count_ptr, + start_ptr, + stride_ptr, + count_ptr, block_ptr); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* verify that H5S_select_shape_same() reports the in - * memory slice through the cube selection and the + /* verify that H5S_select_shape_same() reports the in + * memory slice through the cube selection and the * on disk full small cube selections as having the same shape. */ - check = H5S_select_shape_same_test(small_cube_sid, + check = H5S_select_shape_same_test(small_cube_sid, mem_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); /* write the slice from the in memory large cube to the on disk small cube */ - ret = H5Dwrite(small_cube_dataset, - H5T_NATIVE_UINT16, - mem_large_cube_sid, - small_cube_sid, - xfer_plist, + ret = H5Dwrite(small_cube_dataset, + H5T_NATIVE_UINT16, + mem_large_cube_sid, + small_cube_sid, + xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); /* read the on disk small cube into memory */ - ret = H5Dread(small_cube_dataset, + ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid, - small_cube_sid, - xfer_plist, + small_cube_sid, + xfer_plist, small_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -2134,7 +2134,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } /* end for */ if(mis_match ) TestErrPrintf("small cube data don't match! Line=%d\n",__LINE__); - + x++; } while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size)); w++; @@ -2145,10 +2145,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size)); - /* Now write the contents of the in memory small cube to slices of + /* Now write the contents of the in memory small cube to slices of * the on disk cube. After each write, read the on disk cube - * into memeory, and verify that it contains the expected - * data. Verify that H5S_select_shape_same() returns true on + * into memeory, and verify that it contains the expected + * data. Verify that H5S_select_shape_same() returns true on * the memory and file selections. */ @@ -2173,16 +2173,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, */ /* zero out the on disk cube */ - ret = H5Dwrite(large_cube_dataset, - H5T_NATIVE_USHORT, - mem_large_cube_sid, - file_large_cube_sid, - xfer_plist, + ret = H5Dwrite(large_cube_dataset, + H5T_NATIVE_USHORT, + mem_large_cube_sid, + file_large_cube_sid, + xfer_plist, zero_buf); CHECK(ret, FAIL, "H5Dwrite"); - /* select the portion of the in memory large cube to which we + /* select the portion of the in memory large cube to which we * are going to write data. */ start[0] = (hsize_t)u; @@ -2191,31 +2191,31 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, start[3] = (hsize_t)x; start[4] = (hsize_t)0; - ret = H5Sselect_hyperslab(file_large_cube_sid, + ret = H5Sselect_hyperslab(file_large_cube_sid, H5S_SELECT_SET, - start_ptr, - stride_ptr, - count_ptr, + start_ptr, + stride_ptr, + count_ptr, block_ptr); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* verify that H5S_select_shape_same() reports the in - * memory full selection of the small cube and the - * on disk slice through the large cube selection + /* verify that H5S_select_shape_same() reports the in + * memory full selection of the small cube and the + * on disk slice through the large cube selection * as having the same shape. */ - check = H5S_select_shape_same_test(small_cube_sid, + check = H5S_select_shape_same_test(small_cube_sid, file_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); /* write the cube from memory to the target slice of the disk cube */ - ret = H5Dwrite(large_cube_dataset, - H5T_NATIVE_UINT16, - small_cube_sid, - file_large_cube_sid, - xfer_plist, + ret = H5Dwrite(large_cube_dataset, + H5T_NATIVE_UINT16, + small_cube_sid, + file_large_cube_sid, + xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); @@ -2224,16 +2224,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, ret = H5Sselect_all(file_large_cube_sid); CHECK(ret, FAIL, "H5Sselect_all"); - ret = H5Dread(large_cube_dataset, + ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid, - file_large_cube_sid, - xfer_plist, + file_large_cube_sid, + xfer_plist, large_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); - /* verify that the expected data and only the + /* verify that the expected data and only the * expected data was read. */ start_index = (u * edge_size * edge_size * edge_size * edge_size) + @@ -2266,7 +2266,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, } /* end for */ if(mis_match) TestErrPrintf("large cube written from small cube has bad data! Line=%d\n", __LINE__); - + x++; } while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size)); w++; @@ -2309,10 +2309,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, /**************************************************************** ** -** test_select_hyper_contig_dr(): Test H5S (dataspace) -** selection code with contiguous source and target having +** test_select_hyper_contig_dr(): Test H5S (dataspace) +** selection code with contiguous source and target having ** different ranks but the same shape. We have already -** tested H5S_shape_same in isolation, so now we try to do +** tested H5S_shape_same in isolation, so now we try to do ** I/O. ** ****************************************************************/ @@ -2377,12 +2377,12 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist) /**************************************************************** ** -** test_select_hyper_checker_board_dr__select_checker_board(): -** Given an n-cube data space with each edge of length +** test_select_hyper_checker_board_dr__select_checker_board(): +** Given an n-cube data space with each edge of length ** edge_size, and a checker_edge_size either select a checker ** board selection of the entire cube(if sel_rank == n), ** or select a checker board selection of a -** sel_rank dimensional slice through n-cube parallel to the +** sel_rank dimensional slice through n-cube parallel to the ** sel_rank fastest changing indices, with origin (in the ** higher indices) as indicated by the start array. ** @@ -2438,7 +2438,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, offset_count++; /* Now set up the stride and block arrays, and portions of the start - * and count arrays that will not be altered during the selection of + * and count arrays that will not be altered during the selection of * the checker board. */ u = 0; @@ -2467,7 +2467,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u++; } /* end while */ - + i = 0; do { if(0 >= sel_offset) { @@ -2482,7 +2482,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, } /* end if */ j = 0; - do { + do { if(1 >= sel_offset) { if(j == 0 ) { start[1] = 0; @@ -2535,22 +2535,22 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, if(((i + j + k + l + m) % 2) == 0) { if(first_selection) { - first_selection = FALSE; + first_selection = FALSE; - ret = H5Sselect_hyperslab(tgt_n_cube_sid, + ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_SET, - &(start[n_cube_offset]), - &(stride[n_cube_offset]), - &(count[n_cube_offset]), + &(start[n_cube_offset]), + &(stride[n_cube_offset]), + &(count[n_cube_offset]), &(block[n_cube_offset])); CHECK(ret, FAIL, "H5Sselect_hyperslab"); } /* end if */ else { - ret = H5Sselect_hyperslab(tgt_n_cube_sid, + ret = H5Sselect_hyperslab(tgt_n_cube_sid, H5S_SELECT_OR, - &(start[n_cube_offset]), - &(stride[n_cube_offset]), - &(count[n_cube_offset]), + &(start[n_cube_offset]), + &(stride[n_cube_offset]), + &(count[n_cube_offset]), &(block[n_cube_offset])); CHECK(ret, FAIL, "H5Sselect_hyperslab"); } /* end else */ @@ -2588,21 +2588,21 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, /**************************************************************** ** -** test_select_hyper_checker_board_dr__verify_data(): +** test_select_hyper_checker_board_dr__verify_data(): ** -** Examine the supplied buffer to see if it contains the -** expected data. Return TRUE if it does, and FALSE +** Examine the supplied buffer to see if it contains the +** expected data. Return TRUE if it does, and FALSE ** otherwise. ** ** The supplied buffer is presumed to contain the results -** of read or writing a checkerboard selection of an +** of read or writing a checkerboard selection of an ** n-cube, or a checkerboard selection of an m (1 <= m < n) -** dimensional slice through an n-cube parallel to the -** fastest changing indices. +** dimensional slice through an n-cube parallel to the +** fastest changing indices. ** ** It is further presumed that the buffer was zeroed before -** the read, and that the n-cube was initialize with the -** natural numbers listed in order from the origin along +** the read, and that the n-cube was initialize with the +** natural numbers listed in order from the origin along ** the fastest changing axis. ** ** Thus for a 10x10x10 3-cube, the value stored in location @@ -2611,19 +2611,19 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, ** ** (10 * 10 * x) + (10 * y) + z ** -** Thus, if the buffer contains the result of reading a +** Thus, if the buffer contains the result of reading a ** checker board selection of a 10x10x10 3-cube, location ** (x, y, z) will contain zero if it is not in a checker, ** and 100x + 10y + z if (x, y, z) is in a checker. ** -** If the buffer contains the result of reading a 3 +** If the buffer contains the result of reading a 3 ** dimensional slice (parallel to the three fastest changing -** indices) through an n cube (n > 3), then the expected +** indices) through an n cube (n > 3), then the expected ** values in the buffer will be the same, save that we will -** add a constant determined by the origin of the 3-cube +** add a constant determined by the origin of the 3-cube ** in the n-cube. ** -** Finally, the function presumes that the first element +** Finally, the function presumes that the first element ** of the buffer resides either at the origin of either ** a selected or an unselected checker. ** @@ -2683,7 +2683,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr, l = 0; y = 0; start_in_checker[3] = start_in_checker[2]; - do { + do { if(y >= checker_edge_size) { start_in_checker[3] = ! start_in_checker[3]; y = 0; @@ -2697,7 +2697,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr, in_checker = ! in_checker; z = 0; } /* end if */ - + if(in_checker) { if(*val_ptr != expected_value) good_data = FALSE; @@ -2706,10 +2706,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr, if(*val_ptr != 0) good_data = FALSE; } /* end else */ - + val_ptr++; expected_value++; - + m++; z++; } while((rank >= (test_max_rank - 4)) && (m < edge_size)); @@ -2732,10 +2732,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr, /**************************************************************** ** -** test_select_hyper_checker_board_dr__run_test(): Test H5S -** (dataspace) selection code with checker board source and -** target selections having different ranks but the same -** shape. We have already tested H5S_shape_same in +** test_select_hyper_checker_board_dr__run_test(): Test H5S +** (dataspace) selection code with checker board source and +** target selections having different ranks but the same +** shape. We have already tested H5S_shape_same in ** isolation, so now we try to do I/O. ** ****************************************************************/ @@ -2860,11 +2860,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ /* if chunk edge size is greater than zero, set up the small and - * large data set creation property lists to specify chunked + * large data set creation property lists to specify chunked * datasets. */ if(chunk_edge_size > 0) { - chunk_dims[0] = chunk_dims[1] = + chunk_dims[0] = chunk_dims[1] = chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = chunk_edge_size; small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE); @@ -2889,7 +2889,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ /* create the small cube dataset */ - small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type, + small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type, file_small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT); CHECK(small_cube_dataset, FAIL, "H5Dcreate2"); @@ -2900,7 +2900,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ } /* end if */ /* create the large cube dataset */ - large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type, + large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type, file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT); CHECK(large_cube_dataset, FAIL, "H5Dcreate2"); @@ -2912,17 +2912,17 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ /* write initial data to the on disk datasets */ - ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid, + ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid, full_small_cube_sid, xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); - ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid, + ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid, full_large_cube_sid, xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); /* read initial small cube data from disk and verify that it is as expected. */ - ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid, + ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid, full_small_cube_sid, xfer_plist, small_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -2931,7 +2931,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ edge_size, small_rank); /* read initial large cube data from disk and verify that it is as expected. */ - ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid, + ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid, full_large_cube_sid, xfer_plist, large_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -2944,11 +2944,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * of different rank that H5S_select_shape_same() views as being of the * same shape. * - * Start by reading small_rank-D slice from the on disk large cube, and - * verifying that the data read is correct. Verify that H5S_select_shape_same() + * Start by reading small_rank-D slice from the on disk large cube, and + * verifying that the data read is correct. Verify that H5S_select_shape_same() * returns true on the memory and file selections. * - * The first step is to set up the needed checker board selection in the + * The first step is to set up the needed checker board selection in the * in memory small small cube */ @@ -2961,8 +2961,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ small_rank, sel_start); - /* now read slices from the large, on-disk cube into the small cube. - * Note how we adjust sel_start only in the dimensions peculiar to the + /* now read slices from the large, on-disk cube into the small cube. + * Note how we adjust sel_start only in the dimensions peculiar to the * large cube. */ @@ -3007,10 +3007,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start ); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(mem_small_cube_sid, + check = H5S_select_shape_same_test(mem_small_cube_sid, file_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); @@ -3045,18 +3045,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__); x++; - } while((large_rank >= (test_max_rank - 3)) && + } while((large_rank >= (test_max_rank - 3)) && (small_rank <= (test_max_rank - 4)) && (x < edge_size)); w++; - } while((large_rank >= (test_max_rank - 2)) && + } while((large_rank >= (test_max_rank - 2)) && (small_rank <= (test_max_rank - 3)) && (w < edge_size)); v++; - } while((large_rank >= (test_max_rank - 1)) && + } while((large_rank >= (test_max_rank - 1)) && (small_rank <= (test_max_rank - 2)) && (v < edge_size)); u++; - } while((large_rank >= test_max_rank) && + } while((large_rank >= test_max_rank) && (small_rank <= (test_max_rank - 1)) && (u < edge_size)); - + /* similarly, read the on disk small cube into slices through the in memory * large cube, and verify that the correct data (and only the correct data) @@ -3114,10 +3114,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start ); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(file_small_cube_sid, + check = H5S_select_shape_same_test(file_small_cube_sid, mem_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); @@ -3135,7 +3135,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ CHECK(ret, FAIL, "H5Dread"); - /* verify that the expected data and only the + /* verify that the expected data and only the * expected data was read. */ data_ok = TRUE; @@ -3183,29 +3183,29 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ TestErrPrintf("large cube read from small cube has bad data! Line=%d\n",__LINE__); x++; - } while((large_rank >= (test_max_rank - 3)) && + } while((large_rank >= (test_max_rank - 3)) && (small_rank <= (test_max_rank - 4)) && (x < edge_size)); w++; - } while((large_rank >= (test_max_rank - 2)) && + } while((large_rank >= (test_max_rank - 2)) && (small_rank <= (test_max_rank - 3)) && (w < edge_size)); v++; - } while((large_rank >= (test_max_rank - 1)) && + } while((large_rank >= (test_max_rank - 1)) && (small_rank <= (test_max_rank - 2)) && (v < edge_size)); u++; - } while((large_rank >= test_max_rank) && + } while((large_rank >= test_max_rank) && (small_rank <= (test_max_rank - 1)) && (u < edge_size)); - /* now we go in the opposite direction, verifying that we can write - * from memory to file using selections of different rank that + /* now we go in the opposite direction, verifying that we can write + * from memory to file using selections of different rank that * H5S_select_shape_same() views as being of the same shape. * - * Start by writing small_rank D slices from the in memory large cube, to + * Start by writing small_rank D slices from the in memory large cube, to * the the on disk small cube dataset. After each write, read the small * cube dataset back from disk, and verify that it contains the expected - * data. Verify that H5S_select_shape_same() returns true on the + * data. Verify that H5S_select_shape_same() returns true on the * memory and file selections. - */ + */ /* select a checker board in the file small cube dataspace */ sel_start[0] = sel_start[1] = sel_start[2] = sel_start[3] = sel_start[4] = 0; @@ -3237,11 +3237,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start[3] = x; /* zero out the on disk small cube */ - ret = H5Dwrite(small_cube_dataset, - H5T_NATIVE_UINT16, - full_small_cube_sid, - full_small_cube_sid, - xfer_plist, + ret = H5Dwrite(small_cube_dataset, + H5T_NATIVE_UINT16, + full_small_cube_sid, + full_small_cube_sid, + xfer_plist, zero_buf); CHECK(ret, FAIL, "H5Dwrite"); @@ -3267,22 +3267,22 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start ); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(file_small_cube_sid, + check = H5S_select_shape_same_test(file_small_cube_sid, mem_large_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); - /* write the slice from the in memory large cube to the - * on disk small cube + /* write the slice from the in memory large cube to the + * on disk small cube */ - ret = H5Dwrite(small_cube_dataset, - H5T_NATIVE_UINT16, - mem_large_cube_sid, - file_small_cube_sid, - xfer_plist, + ret = H5Dwrite(small_cube_dataset, + H5T_NATIVE_UINT16, + mem_large_cube_sid, + file_small_cube_sid, + xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); @@ -3291,11 +3291,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size); /* read the on disk small cube into memory */ - ret = H5Dread(small_cube_dataset, + ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid, - full_small_cube_sid, - xfer_plist, + full_small_cube_sid, + xfer_plist, small_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); @@ -3318,24 +3318,24 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__); x++; - } while((large_rank >= (test_max_rank - 3)) && + } while((large_rank >= (test_max_rank - 3)) && (small_rank <= (test_max_rank - 4)) && (x < edge_size)); w++; - } while((large_rank >= (test_max_rank - 2)) && + } while((large_rank >= (test_max_rank - 2)) && (small_rank <= (test_max_rank - 3)) && (w < edge_size)); v++; - } while((large_rank >= (test_max_rank - 1)) && + } while((large_rank >= (test_max_rank - 1)) && (small_rank <= (test_max_rank - 2)) && (v < edge_size)); u++; - } while((large_rank >= test_max_rank) && + } while((large_rank >= test_max_rank) && (small_rank <= (test_max_rank - 1)) && (u < edge_size)); - /* Now write checker board selections of the entries in memory - * small cube to slices of the on disk cube. After each write, - * read the on disk large cube * into memeory, and verify that - * it contains the expected * data. Verify that - * H5S_select_shape_same() returns true on the memory and file + /* Now write checker board selections of the entries in memory + * small cube to slices of the on disk cube. After each write, + * read the on disk large cube * into memeory, and verify that + * it contains the expected * data. Verify that + * H5S_select_shape_same() returns true on the memory and file * selections. */ @@ -3369,11 +3369,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start[3] = x; /* zero out the on disk cube */ - ret = H5Dwrite(large_cube_dataset, - H5T_NATIVE_USHORT, - full_large_cube_sid, - full_large_cube_sid, - xfer_plist, + ret = H5Dwrite(large_cube_dataset, + H5T_NATIVE_USHORT, + full_large_cube_sid, + full_large_cube_sid, + xfer_plist, zero_buf); CHECK(ret, FAIL, "H5Dwrite"); @@ -3399,10 +3399,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ sel_start ); - /* verify that H5S_select_shape_same() reports the two + /* verify that H5S_select_shape_same() reports the two * selections as having the same shape. */ - check = H5S_select_shape_same_test(file_large_cube_sid, + check = H5S_select_shape_same_test(file_large_cube_sid, mem_small_cube_sid); VERIFY(check, TRUE, "H5S_select_shape_same_test"); @@ -3411,11 +3411,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * small cube to a slice through the on disk large * cube. */ - ret = H5Dwrite(large_cube_dataset, - H5T_NATIVE_UINT16, - mem_small_cube_sid, - file_large_cube_sid, - xfer_plist, + ret = H5Dwrite(large_cube_dataset, + H5T_NATIVE_UINT16, + mem_small_cube_sid, + file_large_cube_sid, + xfer_plist, cube_buf); CHECK(ret, FAIL, "H5Dwrite"); @@ -3424,16 +3424,16 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size); /* read the on disk large cube into memory */ - ret = H5Dread(large_cube_dataset, + ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid, - full_large_cube_sid, - xfer_plist, + full_large_cube_sid, + xfer_plist, large_cube_buf_1); CHECK(ret, FAIL, "H5Dread"); - /* verify that the expected data and only the + /* verify that the expected data and only the * expected data was written to the on disk large * cube. */ @@ -3483,18 +3483,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ TestErrPrintf("large cube written from small cube has bad data! Line=%d\n",__LINE__); x++; - } while((large_rank >= (test_max_rank - 3)) && + } while((large_rank >= (test_max_rank - 3)) && (small_rank <= (test_max_rank - 4)) && (x < edge_size)); w++; - } while((large_rank >= (test_max_rank - 2)) && + } while((large_rank >= (test_max_rank - 2)) && (small_rank <= (test_max_rank - 3)) && (w < edge_size)); v++; - } while((large_rank >= (test_max_rank - 1)) && + } while((large_rank >= (test_max_rank - 1)) && (small_rank <= (test_max_rank - 2)) && (v < edge_size)); u++; - } while((large_rank >= test_max_rank) && + } while((large_rank >= test_max_rank) && (small_rank <= (test_max_rank - 1)) && (u < edge_size)); - + /* Close memory dataspaces */ ret = H5Sclose(full_small_cube_sid); @@ -12348,7 +12348,7 @@ test_space_rebuild(void) ret = H5Sselect_hyperslab(sid_reg_ori5,H5S_SELECT_SET,start5,stride5,count5,block5); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* Build up four dimensional regular selection with H5_SELECT_OR, inside HDF5, + /* Build up five dimensional regular selection with H5_SELECT_OR, inside HDF5, it will be treated as an irregular selection. */ start5[4] = 1; count5[4] = 1; @@ -12498,6 +12498,7 @@ test_space_rebuild(void) CHECK(ret,FAIL,"H5S_hyper_rebuild"); }/* No need to do shape comparision */ + /* Add more selections to make it regular again */ start5[3] = 5; count5[3] = 1; stride5[3] = 4; @@ -13071,6 +13072,7 @@ test_select_bounds(void) CHECK(ret, FAIL, "H5Sclose"); } /* test_select_bounds() */ + /**************************************************************** ** ** test_hyper_regular(): Tests query operations on regular hyperslabs diff --git a/test/tsohm.c b/test/tsohm.c index 133b196..d00a03a 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -839,7 +839,7 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); @@ -894,7 +894,7 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); diff --git a/test/ttsafe.c b/test/ttsafe.c index ae4d7c5..89c87a3 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -27,14 +27,8 @@ * Each test module should include ttsafe.h and define a unique set of * names for test files they create. * - * BUGS/LIMITATIONS - * - * EXPORTED ROUTINES/VARIABLES: - * */ -#include "h5test.h" - /* ANY new test needs to have a prototype in ttsafe.h */ #include "ttsafe.h" @@ -120,7 +114,7 @@ int main(int argc, char *argv[]) #else /* H5_HAVE_THREADSAFE */ - printf("Most thread-safety tests skipped because THREADSAFE not enabled\n"); + HDprintf("Most thread-safety tests skipped because THREADSAFE not enabled\n"); #endif /* H5_HAVE_THREADSAFE */ diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c index 42d0851..5c08d09 100644 --- a/test/ttsafe_acreate.c +++ b/test/ttsafe_acreate.c @@ -26,31 +26,15 @@ * dataset), there is a small chance that consecutive reads occur * before a write to that shared variable. * - * HDF5 APIs exercised in thread: - * H5Acreate2, H5Awrite, H5Aclose. - * * Created: Oct 5 1999 * Programmer: Chee Wai LEE * - * Modification History - * -------------------- - * - * 15 May 2000, Chee Wai LEE - * Incorporated into library tests. - * - * 19 May 2000, Bill Wendling - * Changed so that it creates its own HDF5 file and removes it at cleanup - * time. - * ********************************************************************/ #include "ttsafe.h" #ifdef H5_HAVE_THREADSAFE -#include <stdio.h> -#include <stdlib.h> - #define FILENAME "ttsafe_acreate.h5" #define DATASETNAME "IntData" #define NUM_THREADS 16 @@ -64,20 +48,24 @@ typedef struct acreate_data_struct { int current_index; } ttsafe_name_data_t; -void tts_acreate(void) +void +tts_acreate(void) { /* Thread declarations */ H5TS_thread_t threads[NUM_THREADS]; /* HDF5 data declarations */ - hid_t file, dataset; - hid_t dataspace, datatype; - hid_t attribute; + hid_t file = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; + hid_t dataspace = H5I_INVALID_HID; + hid_t datatype = H5I_INVALID_HID; + hid_t attribute = H5I_INVALID_HID; hsize_t dimsf[1]; /* dataset dimensions */ /* data declarations */ int data; /* data to write */ - int buffer, ret, i; + int buffer, i; + herr_t status; ttsafe_name_data_t *attrib_data; @@ -86,25 +74,27 @@ void tts_acreate(void) * creation plist and default file access plist */ file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert(file>=0); + CHECK(file, H5I_INVALID_HID, "H5Fcreate"); /* create a simple dataspace for the dataset */ dimsf[0] = 1; dataspace = H5Screate_simple(1, dimsf, NULL); - assert(dataspace>=0); + CHECK(dataspace, H5I_INVALID_HID, "H5Screate_simple"); /* define datatype for the data using native little endian integers */ datatype = H5Tcopy(H5T_NATIVE_INT); - H5Tset_order(datatype, H5T_ORDER_LE); + CHECK(datatype, H5I_INVALID_HID, "H5Tcopy"); + status = H5Tset_order(datatype, H5T_ORDER_LE); + CHECK(status, FAIL, "H5Tset_order"); /* create a new dataset within the file */ dataset = H5Dcreate2(file, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - assert(dataset >= 0); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); /* initialize data for dataset and write value to dataset */ data = NUM_THREADS; - ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &data); - assert(ret >= 0); + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &data); + CHECK(status, FAIL, "H5Dwrite"); /* * Simultaneously create a large number of attributes to be associated @@ -117,45 +107,46 @@ void tts_acreate(void) attrib_data->dataspace = dataspace; attrib_data->current_index = i; threads[i] = H5TS_create_thread(tts_acreate_thread, NULL, attrib_data); - } /* end for */ + } - for(i = 0; i < NUM_THREADS; i++) { + for(i = 0; i < NUM_THREADS; i++) H5TS_wait_for_thread(threads[i]); - } /* end for */ - /* verify the correctness of the test */ for(i = 0; i < NUM_THREADS; i++) { attribute = H5Aopen(dataset, gen_name(i), H5P_DEFAULT); + CHECK(attribute, H5I_INVALID_HID, "H5Aopen"); if(attribute < 0) TestErrPrintf("unable to open appropriate attribute. Test failed!\n"); else { - ret = H5Aread(attribute, H5T_NATIVE_INT, &buffer); - - if(ret < 0 || buffer != i) - TestErrPrintf("wrong data values. Test failed!\n"); + status = H5Aread(attribute, H5T_NATIVE_INT, &buffer); + CHECK(status, FAIL, "H5Aread"); + VERIFY(buffer, i, "data values don't match"); - H5Aclose(attribute); - } /* end else */ - } /* end for */ + status = H5Aclose(attribute); + CHECK(status, FAIL, "H5Aclose"); + } + } /* close remaining resources */ - ret = H5Sclose(dataspace); - assert(ret >= 0); - ret = H5Tclose(datatype); - assert(ret >= 0); - ret = H5Dclose(dataset); - assert(ret >= 0); - ret = H5Fclose(file); - assert(ret >= 0); -} - -void *tts_acreate_thread(void *client_data) + status = H5Sclose(dataspace); + CHECK(status, FAIL, "H5Sclose"); + status = H5Tclose(datatype); + CHECK(status, FAIL, "H5Sclose"); + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Fclose(file); + CHECK(status, FAIL, "H5Fclose"); +} /* end tts_acreate() */ + +void * +tts_acreate_thread(void *client_data) { - hid_t attribute; + hid_t attribute = H5I_INVALID_HID; char *attribute_name; int *attribute_data; /* data for attributes */ + herr_t status; ttsafe_name_data_t *attrib_data; @@ -166,18 +157,23 @@ void *tts_acreate_thread(void *client_data) attribute = H5Acreate2(attrib_data->dataset, attribute_name, attrib_data->datatype, attrib_data->dataspace, H5P_DEFAULT, H5P_DEFAULT); + CHECK(attribute, H5I_INVALID_HID, "H5Acreate2"); /* Write data to the attribute */ attribute_data = (int *)HDmalloc(sizeof(int)); *attribute_data = attrib_data->current_index; - H5Awrite(attribute, H5T_NATIVE_INT, attribute_data); - H5Aclose(attribute); + status = H5Awrite(attribute, H5T_NATIVE_INT, attribute_data); + CHECK(status, FAIL, "H5Awrite"); + status = H5Aclose(attribute); + CHECK(status, FAIL, "H5Aclose"); return NULL; -} +} /* end tts_acreate_thread() */ -void cleanup_acreate(void) +void +cleanup_acreate(void) { HDunlink(FILENAME); } #endif /*H5_HAVE_THREADSAFE*/ + diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index 4bbb326..dd52232 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -27,20 +27,9 @@ * Temporary files generated: * ttsafe_cancel.h5 * - * HDF5 APIs exercised in thread: - * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate2, H5Dclose, - * H5Dwrite, H5Dread, H5Diterate, H5Tclose, H5Sclose. - * * Created: May 15 2000 * Programmer: Chee Wai LEE * - * Modification History - * -------------------- - * - * 19 May 2000, Bill Wendling - * Changed so that it creates its own HDF5 file and removes it at cleanup - * time. - * ********************************************************************/ #include "ttsafe.h" @@ -66,7 +55,8 @@ pthread_t childthread; pthread_mutex_t mutex; pthread_cond_t cond; -void tts_cancel(void) +void +tts_cancel(void) { pthread_attr_t attribute; hid_t dataset; @@ -116,31 +106,34 @@ void tts_cancel(void) /* Destroy the thread attribute */ ret=pthread_attr_destroy(&attribute); assert(ret==0); -} +} /* end tts_cancel() */ -void *tts_cancel_thread(void H5_ATTR_UNUSED *arg) +void * +tts_cancel_thread(void H5_ATTR_UNUSED *arg) { + hid_t dataspace = H5I_INVALID_HID; + hid_t datatype = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; int datavalue; int buffer; - hid_t dataspace, datatype, dataset; hsize_t dimsf[1]; /* dataset dimensions */ cancel_cleanup_t *cleanup_structure; - int ret; + herr_t status; /* define dataspace for dataset */ dimsf[0] = 1; dataspace = H5Screate_simple(1, dimsf, NULL); - assert(dataspace >= 0); + CHECK(dataspace, H5I_INVALID_HID, "H5Screate_simple"); /* define datatype for the data using native little endian integers */ datatype = H5Tcopy(H5T_NATIVE_INT); - assert(datatype >= 0); - ret = H5Tset_order(datatype, H5T_ORDER_LE); - assert(ret >= 0); + CHECK(datatype, H5I_INVALID_HID, "H5Tcopy"); + status = H5Tset_order(datatype, H5T_ORDER_LE); + CHECK(status, FAIL, "H5Tset_order"); /* create a new dataset within the file */ dataset = H5Dcreate2(cancel_file, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - assert(dataset >= 0); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); /* If thread is cancelled, make cleanup call */ cleanup_structure = (cancel_cleanup_t*)HDmalloc(sizeof(cancel_cleanup_t)); @@ -151,25 +144,26 @@ void *tts_cancel_thread(void H5_ATTR_UNUSED *arg) datavalue = 1; - ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); - assert(ret>=0); + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); + CHECK(status, FAIL, "H5Dwrite"); - ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); - assert(ret>=0); - ret=H5Diterate(&buffer, H5T_NATIVE_INT, dataspace, tts_cancel_callback, &dataset); - assert(ret>=0); + status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); + CHECK(status, FAIL, "H5Dread"); + status = H5Diterate(&buffer, H5T_NATIVE_INT, dataspace, tts_cancel_callback, &dataset); + CHECK(status, FAIL, "H5Diterate"); HDsleep(3); datavalue = 100; - ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); - assert(ret>=0); - ret=H5Dclose(dataset); - assert(ret>=0); - ret=H5Tclose(datatype); - assert(ret>=0); - ret=H5Sclose(dataspace); - assert(ret>=0); + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); + CHECK(status, FAIL, "H5Dwrite"); + + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Tclose(datatype); + CHECK(status, FAIL, "H5Tclose"); + status = H5Sclose(dataspace); + CHECK(status, FAIL, "H5Sclose"); /* * Required by pthreads. The argument 0 pops the stack but does not @@ -178,73 +172,78 @@ void *tts_cancel_thread(void H5_ATTR_UNUSED *arg) pthread_cleanup_pop(0); return NULL; -} +} /* end tts_cancel_thread() */ -herr_t tts_cancel_callback(void *elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, +herr_t +tts_cancel_callback(void *elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void *operator_data) { - int value = *(int *)elem; hid_t dataset = *(hid_t *)operator_data; - int ret; + int value = *(int *)elem; + herr_t status; tts_cancel_barrier(); HDsleep(3); if (value != 1) { TestErrPrintf("Error! Element value should be 1 and not %d\n", value); - return -1; + return FAIL; } value += 10; - ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); - assert(ret>=0); - return 0; -} + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); + CHECK(status, FAIL, "H5Dwrite"); + + return SUCCEED; +} /* end tts_cancel_callback() */ /* * Need to perform the dataset, datatype and dataspace close that was never * performed because of thread cancellation */ -void cancellation_cleanup(void *arg) +void +cancellation_cleanup(void *arg) { cancel_cleanup_t *cleanup_structure = (cancel_cleanup_t *)arg; - int ret; + herr_t status; - ret=H5Dclose(cleanup_structure->dataset); - assert(ret>=0); - ret=H5Tclose(cleanup_structure->datatype); - assert(ret>=0); - ret=H5Sclose(cleanup_structure->dataspace); - assert(ret>=0); + status = H5Dclose(cleanup_structure->dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Tclose(cleanup_structure->datatype); + CHECK(status, FAIL, "H5Tclose"); + status = H5Sclose(cleanup_structure->dataspace); + CHECK(status, FAIL, "H5Sclose"); /* retained for debugging */ /* print_func("cancellation noted, cleaning up ... \n"); */ -} +} /* end cancellation_cleanup() */ /* * Artificial (and specific to this test) barrier to keep track of whether * both the main and child threads have reached a point in the program. */ -void tts_cancel_barrier(void) +void +tts_cancel_barrier(void) { static int count = 2; - int ret; + int status; - ret=pthread_mutex_lock(&mutex); - assert(ret==0); + status = pthread_mutex_lock(&mutex); + VERIFY(status, 0, "pthread_mutex_lock"); if (count != 1) { count--; - ret=pthread_cond_wait(&cond, &mutex); - assert(ret==0); - } else { - ret=pthread_cond_signal(&cond); - assert(ret==0); + status = pthread_cond_wait(&cond, &mutex); + VERIFY(status, 0, "pthread_cond_wait"); + } + else { + status = pthread_cond_signal(&cond); + VERIFY(status, 0, "pthread_cond_signal"); } - ret=pthread_mutex_unlock(&mutex); - assert(ret==0); -} + status = pthread_mutex_unlock(&mutex); + VERIFY(status, 0, "pthread_mutex_unlock"); +} /* end tts_cancel_barrier() */ void cleanup_cancel(void) { @@ -253,3 +252,4 @@ void cleanup_cancel(void) #endif /*H5_HAVE_WIN_THREADS*/ #endif /*H5_HAVE_THREADSAFE*/ + diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index 65051c7..36b5f1f 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -23,20 +23,9 @@ * Temporary files generated: * ttsafe_dcreate.h5 * - * HDF5 APIs exercised in thread: - * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate2, H5Dwrite, H5Dclose, - * H5Tclose, H5Sclose. - * * Created: Apr 28 2000 * Programmer: Chee Wai LEE * - * Modification History - * -------------------- - * - * 19 May 2000, Bill Wendling - * Changed so that it creates its own HDF5 file and removes it at cleanup - * time. - * ********************************************************************/ #include "ttsafe.h" @@ -83,16 +72,18 @@ thread_info thread_out[NUM_THREAD]; * Thread safe test - multiple dataset creation ********************************************************************** */ -void tts_dcreate(void) +void +tts_dcreate(void) { /* thread definitions */ H5TS_thread_t threads[NUM_THREAD]; /* HDF5 data definitions */ - hid_t file, dataset; + hid_t file = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; int datavalue, i; H5TS_attr_t attribute; - int ret; + herr_t status; /* set pthread attribute to perform global scheduling */ H5TS_attr_init(&attribute); @@ -107,7 +98,7 @@ void tts_dcreate(void) * creation plist and default file access plist */ file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert(file >= 0); + CHECK(file, H5I_INVALID_HID, "H5Fcreate"); /* simultaneously create a large number of datasets within the file */ for(i = 0; i < NUM_THREAD; i++) { @@ -115,11 +106,10 @@ void tts_dcreate(void) thread_out[i].file = file; thread_out[i].dsetname = dsetname[i]; threads[i] = H5TS_create_thread(tts_dcreate_creator, NULL, &thread_out[i]); - } /* end for */ + } - for(i = 0;i < NUM_THREAD; i++) { + for(i = 0;i < NUM_THREAD; i++) H5TS_wait_for_thread(threads[i]); - } /* end for */ /* compare data to see if it is written correctly */ @@ -129,36 +119,38 @@ void tts_dcreate(void) H5Fclose(file); return; } else { - ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); - assert(ret >= 0); + status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue); + CHECK(status, FAIL, "H5Dread"); if(datavalue != i) { TestErrPrintf("Wrong value read %d for dataset name %s - test failed\n", datavalue, dsetname[i]); - ret = H5Dclose(dataset); - assert(ret >= 0); - ret = H5Fclose(file); - assert(ret >= 0); + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Fclose(file); + CHECK(status, FAIL, "H5Fclose"); return; } - ret = H5Dclose(dataset); - assert(ret >= 0); + status= H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); } } /* close remaining resources */ - ret = H5Fclose(file); - assert(ret >= 0); + status = H5Fclose(file); + CHECK(status, FAIL, "H5Fclose"); /* Destroy the thread attribute */ H5TS_attr_destroy(&attribute); -} +} /* end tts_dcreate() */ -void *tts_dcreate_creator(void *_thread_data) +void * +tts_dcreate_creator(void *_thread_data) { - hid_t dataspace, dataset; - herr_t ret; + hid_t dataspace = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; + herr_t status; hsize_t dimsf[1]; /* dataset dimensions */ struct thread_info thread_data; @@ -167,28 +159,29 @@ void *tts_dcreate_creator(void *_thread_data) /* define dataspace for dataset */ dimsf[0] = 1; dataspace = H5Screate_simple(1, dimsf, NULL); - assert(dataspace >= 0); + CHECK(dataspace, H5I_INVALID_HID, "H5Screate_simple"); /* create a new dataset within the file */ dataset = H5Dcreate2(thread_data.file, thread_data.dsetname, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - assert(dataset >= 0); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); /* initialize data for dataset and write value to dataset */ - ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &thread_data.id); - assert(ret >= 0); + CHECK(status, FAIL, "H5Dwrite"); /* close dataset and dataspace resources */ - ret = H5Dclose(dataset); - assert(ret >= 0); - ret = H5Sclose(dataspace); - assert(ret >= 0); + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Sclose(dataspace); + CHECK(status, FAIL, "H5Sclose"); return NULL; -} +} /* end tts_dcreate_creator() */ -void cleanup_dcreate(void) +void +cleanup_dcreate(void) { HDunlink(FILENAME); } diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 889d64b..4160d3a 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -25,21 +25,9 @@ * * ttsafe_error.h5 * - * HDF5 APIs exercised in thread: - * - * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate2, H5Dclose, - * H5Tclose, H5Sclose. - * * Created: Apr 28 2000 * Programmer: Chee Wai LEE * - * Modification History - * -------------------- - * - * 19 May 2000, Bill Wendling - * Modified so that it creates a unique HDF5 file and removes it on - * cleanup. - * ********************************************************************/ #include "ttsafe.h" @@ -49,181 +37,191 @@ #define FILENAME "ttsafe_error.h5" /* Having a common dataset name is an error */ -#define DATASETNAME "commonname" -#define EXPECTED_ERROR_DEPTH 8 -#define WRITE_NUMBER 37 - -static herr_t error_callback(hid_t , void *); -static herr_t walk_error_callback(unsigned, const H5E_error2_t *, void *); -static void *tts_error_thread(void *); - -/* Global variables */ -hid_t error_file; +#define DATASETNAME "commonname" +#define EXPECTED_ERROR_DEPTH 7 +#define WRITE_NUMBER 37 +/* Typedefs */ typedef struct err_num_struct { hid_t maj_num; hid_t min_num; } err_num_t; -err_num_t expected[8]; +/* Global variables */ +hid_t error_file_g = H5I_INVALID_HID; +int error_flag_g = 0; +int error_count_g = 0; +err_num_t expected_g[EXPECTED_ERROR_DEPTH]; +H5TS_mutex_simple_t error_mutex_g; + +/* Prototypes */ +static herr_t error_callback(hid_t , void *); +static herr_t walk_error_callback(unsigned, const H5E_error2_t *, void *); +static void *tts_error_thread(void *); -int error_flag = 0; -int error_count = 0; -H5TS_mutex_simple_t error_mutex; -void tts_error(void) +void +tts_error(void) { - H5TS_thread_t threads[NUM_THREAD]; - H5TS_attr_t attribute; - hid_t dataset; - int value, i; - int ret; + hid_t dataset = H5I_INVALID_HID; + H5TS_thread_t threads[NUM_THREAD]; + H5TS_attr_t attribute; + int value, i; + herr_t status; /* Must initialize these at runtime */ - expected[0].maj_num = H5E_DATASET; - expected[0].min_num = H5E_CANTINIT; + expected_g[0].maj_num = H5E_DATASET; + expected_g[0].min_num = H5E_CANTINIT; - expected[1].maj_num = H5E_DATASET; - expected[1].min_num = H5E_CANTINIT; + expected_g[1].maj_num = H5E_DATASET; + expected_g[1].min_num = H5E_CANTINIT; - expected[2].maj_num = H5E_LINK; - expected[2].min_num = H5E_CANTINIT; + expected_g[2].maj_num = H5E_LINK; + expected_g[2].min_num = H5E_CANTINIT; - expected[3].maj_num = H5E_SYM; - expected[3].min_num = H5E_CANTINSERT; + expected_g[3].maj_num = H5E_LINK; + expected_g[3].min_num = H5E_CANTINSERT; - expected[4].maj_num = H5E_SYM; - expected[4].min_num = H5E_NOTFOUND; + expected_g[4].maj_num = H5E_SYM; + expected_g[4].min_num = H5E_NOTFOUND; - expected[5].maj_num = H5E_SYM; - expected[5].min_num = H5E_CALLBACK; + expected_g[5].maj_num = H5E_SYM; + expected_g[5].min_num = H5E_CALLBACK; - expected[6].maj_num = H5E_SYM; - expected[6].min_num = H5E_EXISTS; + expected_g[6].maj_num = H5E_LINK; + expected_g[6].min_num = H5E_EXISTS; /* set up mutex for global count of errors */ - H5TS_mutex_init(&error_mutex); + H5TS_mutex_init(&error_mutex_g); /* make thread scheduling global */ H5TS_attr_init(&attribute); - /* set thread scope to system */ - #ifdef H5_HAVE_SYSTEM_SCOPE_THREADS + /* set thread scope to system */ H5TS_attr_setscope(&attribute, H5TS_SCOPE_SYSTEM); #endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ - /* - * Create a hdf5 file using H5F_ACC_TRUNC access, default file + /* Create a hdf5 file using H5F_ACC_TRUNC access, default file * creation plist and default file access plist */ - error_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert(error_file>=0); + error_file_g = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(error_file_g, H5I_INVALID_HID, "H5Fcreate"); - for (i = 0; i < NUM_THREAD; i++){ + for (i = 0; i < NUM_THREAD; i++) threads[i] = H5TS_create_thread(tts_error_thread, &attribute, NULL); - } - for (i = 0; i < NUM_THREAD; i++){ + for (i = 0; i < NUM_THREAD; i++) H5TS_wait_for_thread(threads[i]); - } - if (error_flag) - TestErrPrintf("Threads reporting different error values!\n"); + if (error_flag_g) { + TestErrPrintf("At least one thread reported a value that was different from the exected value\n"); + HDprintf("(Update this test if the error stack changed!)\n"); + } - if (error_count != NUM_THREAD - 1) - TestErrPrintf("Error: %d threads failed instead of %d\n", error_count, NUM_THREAD-1); + if (error_count_g != NUM_THREAD - 1) + TestErrPrintf("Error: %d threads failed instead of %d\n", error_count_g, NUM_THREAD-1); - dataset = H5Dopen2(error_file, DATASETNAME, H5P_DEFAULT); - assert(dataset >= 0); + dataset = H5Dopen2(error_file_g, DATASETNAME, H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dopen2"); - ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); - assert(ret>=0); + status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); + CHECK(status, FAIL, "H5Dread"); if (value != WRITE_NUMBER) TestErrPrintf("Error: Successful thread wrote value %d instead of %d\n", value, WRITE_NUMBER); - ret=H5Dclose(dataset); - assert(ret>=0); - ret=H5Fclose(error_file); - assert(ret>=0); + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + status = H5Fclose(error_file_g); + CHECK(status, FAIL, "H5Fclose"); H5TS_attr_destroy(&attribute); -} +} /* end tts_error() */ -static -void *tts_error_thread(void H5_ATTR_UNUSED *arg) +static void * +tts_error_thread(void H5_ATTR_UNUSED *arg) { - hid_t dataspace, datatype, dataset; + hid_t dataspace = H5I_INVALID_HID; + hid_t datatype = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; hsize_t dimsf[1]; /* dataset dimensions */ H5E_auto2_t old_error_cb; void *old_error_client_data; int value; - int ret; + herr_t status; /* preserve previous error stack handler */ - H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data); + status = H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data); + CHECK(status, FAIL, "H5Eget_auto2"); /* set each thread's error stack handler */ - H5Eset_auto2(H5E_DEFAULT, error_callback, NULL); + status = H5Eset_auto2(H5E_DEFAULT, error_callback, NULL); + CHECK(status, FAIL, "H5Eset_auto2"); /* define dataspace for dataset */ dimsf[0] = 1; dataspace = H5Screate_simple(1, dimsf, NULL); - assert(dataspace >= 0); + CHECK(dataspace, H5I_INVALID_HID, "H5Screate_simple"); /* define datatype for the data using native little endian integers */ datatype = H5Tcopy(H5T_NATIVE_INT); - assert(datatype >= 0); - H5Tset_order(datatype, H5T_ORDER_LE); + CHECK(datatype, H5I_INVALID_HID, "H5Tcopy"); + status = H5Tset_order(datatype, H5T_ORDER_LE); + CHECK(status, FAIL, "H5Tset_order"); /* create a new dataset within the file */ - dataset = H5Dcreate2(error_file, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if(dataset >= 0) { /* not an error */ + dataset = H5Dcreate2(error_file_g, DATASETNAME, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + /* Most of these will fail, so don't check the error here */ + if (dataset >= 0) { value = WRITE_NUMBER; - H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); - H5Dclose(dataset); - } /* end if */ + status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value); + CHECK(status, FAIL, "H5Dwrite"); + status = H5Dclose(dataset); + CHECK(status, FAIL, "H5Dclose"); + } - ret = H5Tclose(datatype); - assert(ret >= 0); - ret = H5Sclose(dataspace); - assert(ret >= 0); + status = H5Tclose(datatype); + CHECK(status, FAIL, "H5Tclose"); + status = H5Sclose(dataspace); + CHECK(status, FAIL, "H5Sclose"); /* turn our error stack handler off */ - H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data); + status = H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data); + CHECK(status, FAIL, "H5Eset_auto2"); return NULL; -} +} /* end tts_error_thread() */ -static -herr_t error_callback(hid_t H5_ATTR_UNUSED estack_id, void *client_data) +static herr_t +error_callback(hid_t H5_ATTR_UNUSED estack_id, void *client_data) { - H5TS_mutex_lock_simple(&error_mutex); - error_count++; - H5TS_mutex_unlock_simple(&error_mutex); + H5TS_mutex_lock_simple(&error_mutex_g); + error_count_g++; + H5TS_mutex_unlock_simple(&error_mutex_g); return H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, client_data); } -static -herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSED *client_data) +static herr_t +walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSED *client_data) { - hid_t maj_num, min_num; + hid_t maj_num = H5I_INVALID_HID; + hid_t min_num = H5I_INVALID_HID; if (err_desc) { maj_num = err_desc->maj_num; min_num = err_desc->min_num; - if (n < EXPECTED_ERROR_DEPTH && maj_num == expected[n].maj_num && - min_num == expected[n].min_num) + if (n <= EXPECTED_ERROR_DEPTH && maj_num == expected_g[n].maj_num && min_num == expected_g[n].min_num) return SUCCEED; } - error_flag = -1; + error_flag_g = -1; return SUCCEED; } -void cleanup_error(void) +void +cleanup_error(void) { HDunlink(FILENAME); } diff --git a/test/unlink.c b/test/unlink.c index f5754f8..2a7bbcd 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -446,9 +446,9 @@ check_new_move(hid_t fapl) FAIL_STACK_ERROR /* Get hard link info */ - if(H5Oget_info_by_name(file, "/group2/group_new_name", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/group2/group_new_name", &oi_hard1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file, "/group1/hard", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/group1/hard", &oi_hard2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check hard links */ @@ -2228,7 +2228,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2245,7 +2245,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ @@ -2374,7 +2374,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2391,7 +2391,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ diff --git a/test/unregister.c b/test/unregister.c index a4bf24e..dbf6293 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -16,6 +16,7 @@ * Purpose: Tests H5Zunregister function */ #include "h5test.h" +#include "H5CXprivate.h" /* API Contexts */ const char *FILENAME[] = { "unregister_filter_1", @@ -230,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; @@ -249,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; } @@ -115,7 +115,7 @@ vds_select_equal(hid_t space1, hid_t space2) if(npoints1 != npoints2) return FALSE; - /* Allocate point lists. Do not return directly afer + /* Allocate point lists. Do not return directly after * allocating, to make sure buffers are freed. */ if(NULL == (buf1 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t)))) TEST_ERROR @@ -372,7 +372,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, TEST_ERROR /* Test H5Oget_info returns correct metadata size */ - if(H5Oget_info(dset, &oinfo) < 0) + if(H5Oget_info2(dset, &oinfo, H5O_INFO_META_SIZE) < 0) TEST_ERROR if(oinfo.meta_size.obj.index_size != (hsize_t)0) TEST_ERROR @@ -618,6 +618,9 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ + + + /* Should be a value of 174, not 213. HDFFV-10469 */ if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) TEST_ERROR @@ -1150,18 +1153,9 @@ test_vds_prefix(unsigned config, hid_t fapl) 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 */ - hsize_t start[4]; /* Hyperslab start */ - hsize_t stride[4]; /* Hyperslab stride */ - hsize_t count[4]; /* Hyperslab count */ - hsize_t block[4]; /* Hyperslab block */ - hssize_t offset[2] = {0, 0}; /* Selection offset */ int buf[10][26]; /* Write and expected read buffer */ int rbuf[10][26]; /* Read buffer */ - int rbuf99[9][9]; /* 9x9 Read buffer */ - int evbuf[10][26]; /* Expected VDS "buffer" */ - int erbuf[10][26]; /* Expected read buffer */ int fill = -1; /* Fill value */ - herr_t ret; /* Generic return value */ int i, j; char buffer[1024]; /* buffer to read vds_prefix */ diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c index 1de0cc5..42721d5 100644 --- a/test/vds_swmr_reader.c +++ b/test/vds_swmr_reader.c @@ -32,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) |