summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt274
-rw-r--r--test/CMakePassthroughVOLTests.cmake2
-rw-r--r--test/CMakeTests.cmake146
-rw-r--r--test/CMakeVFDTests.cmake4
-rw-r--r--test/COPYING13
-rw-r--r--test/H5srcdir.h62
-rw-r--r--test/H5srcdir_str.h.in2
-rw-r--r--test/Makefile.am50
-rw-r--r--test/Makefile.in303
-rw-r--r--test/SWMR_UseCase_UG.txt6
-rw-r--r--test/ShellTests.cmake9
-rw-r--r--test/accum.c183
-rw-r--r--test/accum_swmr_reader.c2
-rw-r--r--test/app_ref.c4
-rw-r--r--test/atomic_reader.c2
-rw-r--r--test/atomic_writer.c2
-rw-r--r--test/big.c126
-rw-r--r--test/bittests.c4
-rw-r--r--test/btree2.c36
-rw-r--r--test/cache.c8772
-rw-r--r--test/cache_api.c194
-rw-r--r--test/cache_common.c215
-rw-r--r--test/cache_common.h64
-rw-r--r--test/cache_image.c16
-rw-r--r--test/cache_logging.c10
-rw-r--r--test/cache_tagging.c63
-rw-r--r--test/chunk_info.c64
-rw-r--r--test/cmpd_dset.c50
-rw-r--r--test/cmpd_dtransform.c136
-rw-r--r--test/cork.c2
-rw-r--r--test/cross_read.c10
-rw-r--r--test/dangle.c14
-rw-r--r--test/del_many_dense_attrs.c24
-rw-r--r--test/direct_chunk.c6
-rw-r--r--test/dsets.c946
-rw-r--r--test/dt_arith.c81
-rw-r--r--test/dtransform.c46
-rw-r--r--test/dtypes.c323
-rw-r--r--test/earray.c172
-rw-r--r--test/efc.c38
-rw-r--r--test/enc_dec_plist.c22
-rw-r--r--test/enc_dec_plist_cross_platform.c2
-rw-r--r--test/enum.c8
-rw-r--r--test/err_compat.c33
-rw-r--r--test/error_test.c48
-rw-r--r--test/evict_on_close.c2
-rw-r--r--test/extend.c110
-rw-r--r--test/external.c24
-rw-r--r--test/external_common.c4
-rw-r--r--test/external_common.h10
-rw-r--r--test/external_env.c5
-rw-r--r--test/external_fname.h10
-rw-r--r--test/farray.c34
-rw-r--r--test/fheap.c2077
-rw-r--r--test/file_image.c12
-rw-r--r--test/filenotclosed.c6
-rw-r--r--test/fillval.c121
-rw-r--r--test/filter_fail.c8
-rw-r--r--test/filter_plugin.c4
-rw-r--r--test/filter_plugin1_dsets.c18
-rw-r--r--test/filter_plugin2_dsets.c20
-rw-r--r--test/filter_plugin3_dsets.c18
-rw-r--r--test/filter_plugin4_groups.c20
-rw-r--r--test/flush1.c4
-rw-r--r--test/flush2.c18
-rw-r--r--test/flushrefresh.c2
-rw-r--r--test/flushrefreshTest.cmake4
-rw-r--r--test/freespace.c69
-rw-r--r--test/gen_bad_compound.c4
-rw-r--r--test/gen_bad_offset.c2
-rw-r--r--test/gen_bad_ohdr.c4
-rw-r--r--test/gen_bogus.c4
-rw-r--r--test/gen_bounds.c564
-rw-r--r--test/gen_cross.c8
-rw-r--r--test/gen_deflate.c2
-rw-r--r--test/gen_file_image.c2
-rw-r--r--test/gen_filespace.c2
-rw-r--r--test/gen_filters.c8
-rw-r--r--test/gen_mergemsg.c4
-rw-r--r--test/gen_new_array.c4
-rw-r--r--test/gen_new_fill.c4
-rw-r--r--test/gen_new_group.c4
-rw-r--r--test/gen_new_mtime.c4
-rw-r--r--test/gen_new_super.c36
-rw-r--r--test/gen_noencoder.c2
-rw-r--r--test/gen_nullspace.c41
-rw-r--r--test/gen_old_array.c4
-rw-r--r--test/gen_old_group.c4
-rw-r--r--test/gen_old_layout.c4
-rw-r--r--test/gen_old_mtime.c4
-rw-r--r--test/gen_plist.c32
-rw-r--r--test/gen_sizes_lheap.c4
-rw-r--r--test/gen_specmetaread.c23
-rw-r--r--test/gen_udlinks.c4
-rw-r--r--test/genall5.c27
-rw-r--r--test/genall5.h2
-rw-r--r--test/getname.c46
-rw-r--r--test/gheap.c12
-rw-r--r--test/h5test.c296
-rw-r--r--test/h5test.h73
-rw-r--r--test/hdfs.c151
-rw-r--r--test/hyperslab.c36
-rw-r--r--test/istore.c12
-rw-r--r--test/lheap.c8
-rw-r--r--test/links.c270
-rw-r--r--test/links_env.c6
-rw-r--r--test/mf.c226
-rw-r--r--test/mirror_vfd.c2640
-rw-r--r--test/mount.c56
-rw-r--r--test/mtime.c8
-rw-r--r--test/ntypes.c226
-rw-r--r--test/null_vol_connector.c4
-rw-r--r--test/null_vol_connector.h8
-rw-r--r--test/objcopy.c36
-rw-r--r--test/objcopy_ref.c10
-rw-r--r--test/ohdr.c50
-rw-r--r--test/page_buffer.c17
-rw-r--r--test/pool.c16
-rw-r--r--test/reserved.c8
-rw-r--r--test/ros3.c98
-rw-r--r--test/s3comms.c116
-rw-r--r--test/set_extent.c12
-rw-r--r--test/space_overflow.c4
-rw-r--r--test/stab.c12
-rw-r--r--test/swmr.c348
-rw-r--r--test/swmr_addrem_writer.c22
-rw-r--r--test/swmr_check_compat_vfd.c2
-rw-r--r--test/swmr_common.c2
-rw-r--r--test/swmr_common.h8
-rw-r--r--test/swmr_generator.c32
-rw-r--r--test/swmr_reader.c2
-rw-r--r--test/swmr_remove_reader.c2
-rw-r--r--test/swmr_remove_writer.c22
-rw-r--r--test/swmr_sparse_reader.c10
-rw-r--r--test/swmr_sparse_writer.c22
-rw-r--r--test/swmr_start_write.c14
-rw-r--r--test/swmr_writer.c18
-rw-r--r--test/tarray.c48
-rw-r--r--test/tattr.c81
-rw-r--r--test/tcheck_version.c25
-rw-r--r--test/tchecksum.c4
-rw-r--r--test/tconfig.c2
-rw-r--r--test/tcoords.c22
-rw-r--r--test/test_filter_plugin.sh.in12
-rw-r--r--test/test_mirror.sh.in100
-rw-r--r--test/test_usecases.sh.in2
-rw-r--r--test/test_vol_plugin.sh.in12
-rw-r--r--test/testabort_fail.sh.in8
-rw-r--r--test/testcheck_version.sh.in20
-rw-r--r--test/testerror.sh.in16
-rw-r--r--test/testexternal_env.sh.in10
-rw-r--r--test/testfiles/err_compat_15
-rw-r--r--test/testflushrefresh.sh.in18
-rw-r--r--test/testframe.c14
-rw-r--r--test/testhdf5.c5
-rw-r--r--test/testhdf5.h3
-rw-r--r--test/testlibinfo.sh.in8
-rw-r--r--test/testlinks_env.sh.in6
-rw-r--r--test/testmeta.c6
-rw-r--r--test/testswmr.sh.in2
-rw-r--r--test/testvds_env.sh.in6
-rw-r--r--test/testvdsswmr.sh.in2
-rw-r--r--test/tfile.c80
-rw-r--r--test/tgenprop.c6
-rw-r--r--test/th5o.c6
-rw-r--r--test/th5s.c112
-rw-r--r--test/theap.c4
-rw-r--r--test/thread_id.c324
-rw-r--r--test/tid.c409
-rw-r--r--test/timer.c402
-rw-r--r--test/titerate.c10
-rw-r--r--test/tmeta.c2
-rw-r--r--test/tmisc.c172
-rw-r--r--test/trefer.c1395
-rw-r--r--test/trefer_deprec.c6
-rw-r--r--test/trefstr.c6
-rw-r--r--test/tselect.c392
-rw-r--r--test/tskiplist.c2
-rw-r--r--test/tsohm.c2
-rw-r--r--test/ttime.c2
-rw-r--r--test/ttsafe.c22
-rw-r--r--test/ttsafe.h16
-rw-r--r--test/ttsafe_acreate.c2
-rw-r--r--test/ttsafe_attr_vlen.c176
-rw-r--r--test/ttsafe_cancel.c34
-rw-r--r--test/ttsafe_dcreate.c4
-rw-r--r--test/ttsafe_error.c18
-rw-r--r--test/ttsafe_rec_rw_lock.c1307
-rw-r--r--test/ttst.c391
-rw-r--r--test/tunicode.c10
-rw-r--r--test/tvlstr.c23
-rw-r--r--test/tvltypes.c160
-rw-r--r--test/twriteorder.c22
-rw-r--r--test/unlink.c8
-rw-r--r--test/unregister.c25
-rw-r--r--test/use.h40
-rw-r--r--test/use_append_chunk.c195
-rw-r--r--test/use_append_chunk_mirror.c401
-rw-r--r--test/use_append_mchunks.c166
-rw-r--r--test/use_common.c305
-rw-r--r--test/use_disable_mdc_flushes.c12
-rw-r--r--test/vds.c5378
-rw-r--r--test/vds_env.c4
-rw-r--r--test/vds_swmr.h4
-rw-r--r--test/vds_swmr_gen.c2
-rw-r--r--test/vds_swmr_reader.c2
-rw-r--r--test/vds_swmr_writer.c2
-rw-r--r--test/vfd.c1370
-rw-r--r--test/vol.c58
-rw-r--r--test/vol_plugin.c2
210 files changed, 18986 insertions, 15899 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 894002a..f3e2db9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -20,6 +20,7 @@ set (TEST_LIB_SOURCES
set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
+ ${HDF5_TEST_SOURCE_DIR}/H5srcdir.h
${HDF5_TEST_SOURCE_DIR}/cache_common.h
${HDF5_TEST_SOURCE_DIR}/external_common.h
${HDF5_TEST_SOURCE_DIR}/external_fname.h
@@ -29,9 +30,10 @@ set (TEST_LIB_HEADERS
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
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}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_TEST_LIB_TARGET}
PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET}
@@ -47,12 +49,11 @@ endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
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}>"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_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"
- )
+ target_compile_options(${HDF5_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_TEST_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
PUBLIC ${LINK_LIBS} ${HDF5_LIBSH_TARGET}
@@ -65,6 +66,17 @@ if (BUILD_SHARED_LIBS)
set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_TEST_SRC_FORMAT ${HDF5_TEST_LIB_TARGET})
+ else ()
+ clang_format (HDF5_TEST_SRC_FORMAT ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+endif ()
+
#################################################################################
# If filter and vol plugin tests can be tested
#################################################################################
@@ -91,13 +103,20 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_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_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_TEST_PLUGIN_TARGET}_FORMAT ${HDF5_TEST_PLUGIN_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -116,13 +135,20 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_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_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_TEST_PLUGIN_TARGET}_FORMAT ${HDF5_TEST_PLUGIN_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -153,13 +179,20 @@ if (BUILD_SHARED_LIBS)
set (HDF5_VOL_PLUGIN_LIB_TARGET ${HDF5_VOL_PLUGIN_LIB_CORENAME})
add_library (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vol_lib}.c)
- target_include_directories (${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED)
target_link_libraries (${HDF5_VOL_PLUGIN_LIB_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_VOL_PLUGIN_LIB_TARGET} ${HDF5_VOL_PLUGIN_LIB_NAME} SHARED "LIB")
set_target_properties (${HDF5_VOL_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_VOL_PLUGIN_LIB_TARGET}_FORMAT ${HDF5_VOL_PLUGIN_LIB_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy VOL plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -178,6 +211,7 @@ endif ()
#################################################################################
set (testhdf5_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/testhdf5.h
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
${HDF5_TEST_SOURCE_DIR}/tarray.c
${HDF5_TEST_SOURCE_DIR}/tattr.c
@@ -200,7 +234,6 @@ set (testhdf5_SOURCES
${HDF5_TEST_SOURCE_DIR}/tskiplist.c
${HDF5_TEST_SOURCE_DIR}/tsohm.c
${HDF5_TEST_SOURCE_DIR}/ttime.c
- ${HDF5_TEST_SOURCE_DIR}/ttst.c
${HDF5_TEST_SOURCE_DIR}/tunicode.c
${HDF5_TEST_SOURCE_DIR}/tvltypes.c
${HDF5_TEST_SOURCE_DIR}/tvlstr.c
@@ -211,12 +244,20 @@ set (cache_image_SOURCES
${HDF5_TEST_SOURCE_DIR}/genall5.c
)
+set(mirror_vfd_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/mirror_vfd.c
+ ${HDF5_TEST_SOURCE_DIR}/genall5.c
+)
+
set (ttsafe_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.h
${HDF5_TEST_SOURCE_DIR}/ttsafe.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_attr_vlen.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_rec_rw_lock.c
)
set (H5_TESTS
@@ -273,6 +314,7 @@ set (H5_TESTS
ros3
s3comms
hdfs
+ mirror_vfd
ntypes
dangle
dtransform
@@ -287,12 +329,16 @@ set (H5_TESTS
cache_logging
cork
swmr
+ thread_id # special link
vol
+ timer
+ cmpd_dtransform
)
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -301,6 +347,13 @@ macro (ADD_H5_EXE file)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (${file} PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${file}_FORMAT ${file})
+ endif ()
endmacro ()
set (H5_TESTS_MULTIPLE
@@ -309,6 +362,8 @@ set (H5_TESTS_MULTIPLE
testhdf5
cache_image
ttsafe
+ thread_id # special link
+ mirror_vfd
)
# Only build single source tests here
foreach (h5_test ${H5_TESTS})
@@ -323,7 +378,8 @@ endforeach ()
######### Also special handling of link libs #############
#-- Adding test for chunk_info
add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c)
-target_include_directories (chunk_info PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(chunk_info PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (chunk_info PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (chunk_info STATIC)
target_link_libraries (chunk_info PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
@@ -333,9 +389,17 @@ else ()
endif ()
set_target_properties (chunk_info PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_SRC_chunk_info_FORMAT chunk_info)
+endif ()
+
#-- 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_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (direct_chunk STATIC)
target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
@@ -345,11 +409,18 @@ else ()
endif ()
set_target_properties (direct_chunk PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_direct_chunk_FORMAT direct_chunk)
+endif ()
######### Special handling for multiple sources #############
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
-target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(testhdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testhdf5 STATIC)
target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -359,9 +430,17 @@ else ()
endif ()
set_target_properties (testhdf5 PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_testhdf5_FORMAT testhdf5)
+endif ()
+
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
-target_include_directories (cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cache_image STATIC)
target_link_libraries (cache_image PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -371,9 +450,17 @@ else ()
endif ()
set_target_properties (cache_image PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_cache_image_FORMAT cache_image)
+endif ()
+
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
-target_include_directories (ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (ttsafe STATIC)
target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -388,6 +475,58 @@ else ()
endif ()
set_target_properties (ttsafe PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_ttsafe_FORMAT ttsafe)
+endif ()
+
+######### Special handling for extra link lib of threads #############
+#-- Adding test for thread_id
+add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
+target_compile_options(thread_id PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (thread_id PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (thread_id STATIC)
+ target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIB_TARGET})
+ if (NOT WIN32)
+ target_link_libraries (thread_id
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ )
+ endif ()
+else ()
+ TARGET_C_PROPERTIES (thread_id SHARED)
+ target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
+endif ()
+set_target_properties (thread_id PROPERTIES FOLDER test)
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_thread_id_FORMAT thread_id)
+endif ()
+
+#-- Adding test for mirror_vfd
+add_executable (mirror_vfd ${mirror_vfd_SOURCES})
+target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (mirror_vfd STATIC)
+ target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (mirror_vfd SHARED)
+ target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+endif ()
+set_target_properties (mirror_vfd PROPERTIES FOLDER test)
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
+endif ()
+
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
@@ -448,15 +587,37 @@ set (H5_VDS_SWMR_TESTS
vds_swmr_writer
)
+macro (ADD_H5_VDS_EXE file)
+ add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c ${HDF5_TEST_SOURCE_DIR}/vds_swmr.h)
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+ set_target_properties (${file} PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${file}_FORMAT ${file})
+ endif ()
+endmacro ()
+
foreach (h5_test ${H5_VDS_SWMR_TESTS})
- ADD_H5_EXE(${h5_test})
+ ADD_H5_VDS_EXE(${h5_test})
endforeach ()
#-- Adding test for accum_swmr_reader
# This has to be copied to the test directory for execve() to find it
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
-target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(accum_swmr_reader PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
@@ -466,6 +627,13 @@ else ()
endif ()
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_accum_swmr_reader_FORMAT accum_swmr_reader)
+endif ()
+
#-- Set accum dependencies
set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader)
@@ -474,24 +642,39 @@ set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader)
##############################################################################
if (BUILD_SHARED_LIBS)
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
- target_include_directories (filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (filter_plugin SHARED)
target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_filter_plugin_FORMAT filter_plugin)
+ endif ()
+
add_executable (vol_plugin ${HDF5_TEST_SOURCE_DIR}/vol_plugin.c)
- target_include_directories (vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (vol_plugin SHARED)
target_link_libraries (vol_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (vol_plugin PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_vol_plugin_FORMAT vol_plugin)
+ endif ()
endif ()
##############################################################################
### U S E C A S E S T E S T S
##############################################################################
-set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
+set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
-target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk STATIC)
target_link_libraries (use_append_chunk PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -501,9 +684,37 @@ else ()
endif ()
set_target_properties (use_append_chunk PROPERTIES FOLDER test)
-set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_append_chunk_FORMAT use_append_chunk)
+endif ()
+
+set (use_append_chunk_mirror_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk_mirror.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
+add_executable (use_append_chunk_mirror ${use_append_chunk_mirror_SOURCES})
+target_compile_options(use_append_chunk_mirror PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (use_append_chunk_mirror STATIC)
+ target_link_libraries (use_append_chunk_mirror PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (use_append_chunk_mirror SHARED)
+ target_link_libraries (use_append_chunk_mirror PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+endif ()
+set_target_properties (use_append_chunk_mirror PROPERTIES FOLDER test)
+
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_append_chunk_mirror_FORMAT use_append_chunk_mirror)
+endif ()
+
+set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
-target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_mchunks STATIC)
target_link_libraries (use_append_mchunks PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -513,9 +724,17 @@ else ()
endif ()
set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_append_mchunks_FORMAT use_append_mchunks)
+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_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -525,6 +744,13 @@ else ()
endif ()
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_disable_mdc_flushes_FORMAT use_disable_mdc_flushes)
+endif ()
+
if (HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/test/CMakePassthroughVOLTests.cmake b/test/CMakePassthroughVOLTests.cmake
index e1b1f92..cf5ad36 100644
--- a/test/CMakePassthroughVOLTests.cmake
+++ b/test/CMakePassthroughVOLTests.cmake
@@ -5,7 +5,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index b7eaa56..e5ad962 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -263,6 +263,9 @@ set (test_CLEANFILES
bt2_hdr_fd.h5
storage_size.h5
dls_01_strings.h5
+ power2up.h5
+ version_bounds.h5
+ alloc_0sized.h5
extend.h5
istore.h5
extlinks*.h5
@@ -285,60 +288,19 @@ set (test_CLEANFILES
dt_arith2
links.h5
links*.h5
- extlinks16A00000.h5
- extlinks16A00001.h5
- extlinks16A00002.h5
- extlinks16B-b.h5
- extlinks16B-g.h5
- extlinks16B-l.h5
- extlinks16B-r.h5
- extlinks16B-s.h5
- extlinks19B00000.h5
- extlinks19B00001.h5
- extlinks19B00002.h5
- extlinks19B00003.h5
- extlinks19B00004.h5
- extlinks19B00005.h5
- extlinks19B00006.h5
- extlinks19B00007.h5
- extlinks19B00008.h5
- extlinks19B00009.h5
- extlinks19B00010.h5
- extlinks19B00011.h5
- extlinks19B00012.h5
- extlinks19B00013.h5
- extlinks19B00014.h5
- extlinks19B00015.h5
- extlinks19B00016.h5
- extlinks19B00017.h5
- extlinks19B00018.h5
- extlinks19B00019.h5
- extlinks19B00020.h5
- extlinks19B00021.h5
- extlinks19B00022.h5
- extlinks19B00023.h5
- extlinks19B00024.h5
- extlinks19B00025.h5
- extlinks19B00026.h5
- extlinks19B00027.h5
- extlinks19B00028.h5
+ extlinks*.h5
+ tmp
+ tmp_links
+ tmp2_links
+ tmp_links_env
+ tmp_vds/*
+ tmp_vds_env/*
big.data
big*.h5
stdio.h5
sec2.h5
- dtypes0.h5
- dtypes1.h5
- dtypes2.h5
- dtypes3.h5
- dtypes4.h5
- dtypes5.h5
- dtypes6.h5
- dtypes7.h5
- dtypes8.h5
- dtypes9.h5
- dtypes10.h5
- dt_arith1.h5
- dt_arith2.h5
+ dtypes*.h5
+ dt_arith*.h5
tattr.h5
tselect.h5
mtime.h5
@@ -350,40 +312,38 @@ set (test_CLEANFILES
mount_*.h5
testmeta.h5
ttime.h5
- trefer1.h5
- trefer2.h5
- trefer3.h5
+ trefer*.h5
+ trefer_*.h5
tvltypes.h5
tvlstr.h5
tvlstr2.h5
twriteorder.dat
+ flush.h5
+ flush-swmr.h5
+ noflush.h5
+ noflush-swmr.h5
+ flush_extend.h5
+ flush_extend-swmr.h5
+ noflush_extend.h5
+ noflush_extend-swmr.h5
enum1.h5
titerate.h5
ttsafe.h5
tarray1.h5
tgenprop.h5
tmisc*.h5
- set_extent1.h5
- set_extent2.h5
- set_extent3.h5
- set_extent4.h5
- set_extent5.h5
- ext1.bin
- ext2.bin
+ set_extent*.h5
+ ext*.bin
getname.h5
- getname1.h5
- getname2.h5
- getname3.h5
+ getname*.h5
sec2_file.h5
direct_file.h5
family_file000*.h5
new_family_v16_000*.h5
- multi_file-r.h5
- multi_file-s.h5
+ multi_file-*.h5
core_file
filter_plugin.h5
- new_move_a.h5
- new_move_b.h5
+ new_move_*.h5
ntypes.h5
dangle.h5
error_test.h5
@@ -391,28 +351,22 @@ set (test_CLEANFILES
dtransform.h5
test_filters.h5
get_file_name.h5
- tstint1.h5
- tstint2.h5
+ tstint*.h5
unlink_chunked.h5
btree2.h5
btree2_tmp.h5
objcopy_src.h5
objcopy_dst.h5
objcopy_ext.dat
- trefer1.h5
- trefer2.h5
app_ref.h5
farray.h5
farray_tmp.h5
earray.h5
earray_tmp.h5
- efc0.h5
- efc1.h5
- efc2.h5
- efc3.h5
- efc4.h5
- efc5.h5
+ efc*.h5
log_vfd_out.log
+ log_ros3_out.log
+ log_s3comms_out.log
new_multi_file_v16-r.h5
new_multi_file_v16-s.h5
split_get_file_image_test-m.h5
@@ -422,13 +376,11 @@ set (test_CLEANFILES
unregister_filter_2.h5
vds_virt.h5
vds_dapl.h5
- vds_src_0.h5
- vds_src_1.h5
+ vds_src_*.h5
swmr_data.h5
use_use_append_chunk.h5
use_append_mchunks.h5
use_disable_mdc_flushes.h5
- tbogus.h5.copy
flushrefresh.h5
flushrefresh_VERIFICATION_START
flushrefresh_VERIFICATION_CHECKPOINT1
@@ -444,9 +396,19 @@ set (test_CLEANFILES
cache_logging.out
vds_swmr.h5
vds_swmr_src_*.h5
- tmp_vds_env/vds_src_2.h5
+ swmr*.h5
+ swmr_writer.out
+ swmr_writer.log.*
+ swmr_reader.out.*
+ swmr_reader.log.*
+ tbogus.h5.copy
+ cache_image_test.h5
direct_chunk.h5
native_vol_test.h5
+ splitter*.h5
+ splitter.log
+ mirror_rw/*
+ mirror_wo/*
)
# Remove any output file left over from previous test run
@@ -882,7 +844,7 @@ endif ()
### F I L T E R P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
- if (WIN32 OR MINGW)
+ if (WIN32)
set (CMAKE_SEP "\;")
set (BIN_REL_PATH "../../")
else ()
@@ -926,8 +888,7 @@ if (ENABLE_EXTENDED_TESTS)
#-- Adding test for flushrefresh
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_PERL_FOUND)
add_test (
NAME H5TEST-testflushrefresh-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove flushrefresh.h5
@@ -953,9 +914,9 @@ if (ENABLE_EXTENDED_TESTS)
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 ()
-else ()
- message (STATUS "Cannot execute TEST flushrefresh - perl not found")
endif ()
##############################################################################
@@ -978,7 +939,7 @@ endif ()
### V O L P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
- if (WIN32 OR MINGW)
+ if (WIN32)
set (CMAKE_SEP "\;")
set (BIN_REL_PATH "../../")
else ()
@@ -1006,10 +967,17 @@ endif ()
if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_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)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${genfile}_FORMAT ${genfile})
+ endif ()
endmacro ()
# generator executables
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index d4a5ddc..892ccf3 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -5,7 +5,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -26,7 +26,7 @@ set (VFD_LIST
multi
family
)
-if (DIRECT_VFD)
+if (H5_HAVE_DIRECT)
set (VFD_LIST ${VFD_LIST} direct)
endif ()
diff --git a/test/COPYING b/test/COPYING
deleted file mode 100644
index 6497ace..0000000
--- a/test/COPYING
+++ /dev/null
@@ -1,13 +0,0 @@
-
- Copyright by The HDF Group and
- The Board of Trustees of the University of Illinois.
- All rights reserved.
-
- The files and subdirectories in this directory are part of HDF5.
- The full HDF5 copyright notice, including terms governing use,
- modification, and redistribution, is contained in the COPYING file
- which can be found at the root of the source code distribution tree
- or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
- not have access to either file, you may request a copy from
- help@hdfgroup.org.
-
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index 4308a76..8cc91d1 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -6,65 +6,31 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, March 17, 2010
*
* Purpose: srcdir querying support.
*/
-#ifndef _H5SRCDIR_H
-#define _H5SRCDIR_H
-
-/* Include the header file with the correct relative path for the srcdir string */
-#include "H5srcdir_str.h"
-
-/* Buffer to construct path in and return pointer to */
-static char srcdir_path[1024] = "";
-
-/* Buffer to construct file in and return pointer to */
-static char srcdir_testpath[1024] = "";
+#ifndef H5SRCDIR_H
+#define H5SRCDIR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
/* Just return the srcdir path */
-static const char *
-H5_get_srcdir(void)
-{
- const char *srcdir = HDgetenv("srcdir");
-
- /* Check for using the srcdir from configure time */
- if (NULL == srcdir)
- srcdir = config_srcdir;
-
- /* Build path to all test files */
- if ((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
- HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
- return (srcdir_path);
- } /* end if */
- else
- return (NULL);
-} /* end H5_get_srcdir() */
+H5TEST_DLL const char *H5_get_srcdir(void);
/* Append the test file name to the srcdir path and return the whole string */
-static const char *
-H5_get_srcdir_filename(const char *filename)
-{
- const char *srcdir = H5_get_srcdir();
+H5TEST_DLL const char *H5_get_srcdir_filename(const char *filename);
+
+#ifdef __cplusplus
+}
+#endif
- /* Check for error */
- if (NULL == srcdir)
- return (NULL);
- else {
- /* Build path to test file */
- if ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
- HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
- return (srcdir_testpath);
- } /* end if */
- else
- return (NULL);
- } /* end else */
-} /* end H5_get_srcdir_filename() */
-#endif /* _H5SRCDIR_H */
+#endif /* H5SRCDIR_H */
diff --git a/test/H5srcdir_str.h.in b/test/H5srcdir_str.h.in
index bab1df3..988c065 100644
--- a/test/H5srcdir_str.h.in
+++ b/test/H5srcdir_str.h.in
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/Makefile.am b/test/Makefile.am
index 57080aa..63bc4be 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -6,7 +6,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
@@ -33,9 +33,11 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# testvdsswmr.sh: vds_swmr*
# testabort_fail.sh: filenotclosed.c and del_many_dense_attrs.c
# test_filter_plugin.sh: filter_plugin.c
+# test_mirror.sh: mirror_vfd ../utils/mirror_vfd/*
# 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 testexternal_env.sh \
- testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh
+ testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh \
+ test_mirror.sh
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \
external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
@@ -58,12 +60,13 @@ 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 chunk_info cmpd_dset filter_fail extend direct_chunk \
- external efc objcopy objcopy_ref links unlink twriteorder big mtime fillval mount \
+ dtypes dsets chunk_info cmpd_dset cmpd_dtransform filter_fail extend direct_chunk \
+ external efc objcopy objcopy_ref 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 ros3 s3comms hdfs ntypes \
dangle dtransform reserved cross_read freespace mf vds file_image \
- unregister cache_logging cork swmr vol
+ unregister cache_logging cork swmr thread_id vol timer
# 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.
@@ -78,16 +81,18 @@ TEST_PROG= testhdf5 \
# swmr_* files (besides swmr.c) are used by testswmr.sh.
# vds_swmr_* files are used by testvdsswmr.sh
# vds_env is used by testvds_env.sh
+# mirror_vfd is used by test_mirror.sh
# 'make check' doesn't run them directly, so they are not included in TEST_PROG.
# Also build testmeta, which is used for timings test. It builds quickly,
# and this lets automake keep all its test programs in one place.
check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \
testmeta accum_swmr_reader atomic_writer atomic_reader external_env \
links_env filenotclosed del_many_dense_attrs flushrefresh \
- use_append_chunk use_append_mchunks use_disable_mdc_flushes \
+ use_append_chunk use_append_chunk_mirror use_append_mchunks use_disable_mdc_flushes \
swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \
swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \
- swmr_check_compat_vfd vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer
+ swmr_check_compat_vfd vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer \
+ mirror_vfd
if HAVE_SHARED_CONDITIONAL
check_PROGRAMS+= filter_plugin vol_plugin
endif
@@ -142,8 +147,9 @@ LDADD=libh5test.la $(LIBHDF5)
# List the source files for tests that have more than one
ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
- ttsafe_acreate.c
+ ttsafe_acreate.c ttsafe_attr_vlen.c ttsafe_rec_rw_lock.c
cache_image_SOURCES=cache_image.c genall5.c
+mirror_vfd_SOURCES=mirror_vfd.c genall5.c
VFD_LIST = sec2 stdio core core_paged split multi family
if DIRECT_VFD_CONDITIONAL
@@ -179,14 +185,15 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
chunk_fixed.h5 copy_dcpl_newfile.h5 partial_chunks.h5 layout_extend.h5 \
zero_chunk.h5 chunk_single.h5 swmr_non_latest.h5 \
earray_hdr_fd.h5 farray_hdr_fd.h5 bt2_hdr_fd.h5 \
- storage_size.h5 dls_01_strings.h5 \
+ storage_size.h5 dls_01_strings.h5 power2up.h5 version_bounds.h5 \
+ alloc_0sized.h5 \
extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \
sys_file1 tfile[1-7].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \
stab.h5 extern_[1-5].h5 extern_[1-4][rw].raw gheap[0-4].h5 \
- ohdr_min_a.h5 ohdr_min_b.h5 min_dset_ohdr_testfile.h5\
+ ohdr_min_a.h5 ohdr_min_b.h5 min_dset_ohdr_testfile.h5 \
dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 \
- tmp tmp_links tmp2_links tmp_links_env tmp_vds_env \
- big.data big[0-9][0-9][0-9][0-9][0-9].h5 \
+ tmp tmp_links tmp2_links tmp_links_env tmp_vds tmp_vds_env \
+ big.data big[0-9][0-9][0-9][0-9][0-9].h5 \
stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \
tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \
fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 ttime.h5 \
@@ -201,34 +208,37 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \
dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 btree2_tmp.h5 objcopy_src.h5 objcopy_dst.h5 \
- objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 farray_tmp.h5 \
+ objcopy_ext.dat app_ref.h5 farray.h5 farray_tmp.h5 \
earray.h5 earray_tmp.h5 efc[0-5].h5 log_vfd_out.log log_ros3_out.log \
log_s3comms_out.log new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \
split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \
file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \
vds_virt.h5 vds_dapl.h5 vds_src_[0-1].h5 \
- swmr_data.h5 use_use_append_chunk.h5 use_append_mchunks.h5 use_disable_mdc_flushes.h5 \
- flushrefresh.h5 flushrefresh_VERIFICATION_START \
+ swmr_data.h5 use_use_append_chunk.h5 use_append_mchunks.h5 \
+ use_disable_mdc_flushes.h5 flushrefresh.h5 flushrefresh_VERIFICATION_START \
flushrefresh_VERIFICATION_CHECKPOINT1 flushrefresh_VERIFICATION_CHECKPOINT2 \
- flushrefresh_VERIFICATION_DONE atomic_data accum_swmr_big.h5 ohdr_swmr.h5 \
+ flushrefresh_VERIFICATION_DONE filenotclosed.h5 del_many_dense_attrs.h5 \
+ 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 direct_chunk.h5 native_vol_test.h5
+ tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5 \
+ splitter*.h5 splitter.log mirror_rw mirror_ro
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
tgenprop.c th5o.c th5s.c tcoords.c theap.c tid.c titerate.c tmeta.c tmisc.c \
- trefer.c trefer_deprec.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c ttst.c tunicode.c \
+ trefer.c trefer_deprec.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c tunicode.c \
tvlstr.c tvltypes.c
# Sources for Use Cases
use_append_chunk_SOURCES=use_append_chunk.c use_common.c
+use_append_chunk_mirror_SOURCES=use_append_chunk_mirror.c use_common.c
use_append_mchunks_SOURCES=use_append_mchunks.c use_common.c
use_disable_mdc_flushes_SOURCES=use_disable_mdc_flushes.c
# Temporary files.
DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filter_plugin.sh \
- testexternal_env.sh testswmr.sh testvds_env.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh testabort_fail.sh \
- test_vol_plugin.sh
+ testexternal_env.sh testswmr.sh testvds_env.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh \
+ testabort_fail.sh test_vol_plugin.sh test_mirror.sh
include $(top_srcdir)/config/conclude.am
diff --git a/test/Makefile.in b/test/Makefile.in
index 8b8796c..c2a5ee1 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -22,7 +22,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -112,15 +112,16 @@ check_PROGRAMS = $(am__EXEEXT_1) error_test$(EXEEXT) \
atomic_reader$(EXEEXT) external_env$(EXEEXT) \
links_env$(EXEEXT) filenotclosed$(EXEEXT) \
del_many_dense_attrs$(EXEEXT) flushrefresh$(EXEEXT) \
- use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) \
- use_disable_mdc_flushes$(EXEEXT) swmr_generator$(EXEEXT) \
- swmr_start_write$(EXEEXT) swmr_reader$(EXEEXT) \
- swmr_writer$(EXEEXT) swmr_remove_reader$(EXEEXT) \
- swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \
- swmr_sparse_reader$(EXEEXT) swmr_sparse_writer$(EXEEXT) \
- swmr_check_compat_vfd$(EXEEXT) vds_env$(EXEEXT) \
- vds_swmr_gen$(EXEEXT) vds_swmr_reader$(EXEEXT) \
- vds_swmr_writer$(EXEEXT) $(am__EXEEXT_2)
+ use_append_chunk$(EXEEXT) use_append_chunk_mirror$(EXEEXT) \
+ use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
+ swmr_generator$(EXEEXT) swmr_start_write$(EXEEXT) \
+ swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \
+ swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) \
+ swmr_addrem_writer$(EXEEXT) swmr_sparse_reader$(EXEEXT) \
+ swmr_sparse_writer$(EXEEXT) swmr_check_compat_vfd$(EXEEXT) \
+ vds_env$(EXEEXT) vds_swmr_gen$(EXEEXT) \
+ vds_swmr_reader$(EXEEXT) vds_swmr_writer$(EXEEXT) \
+ mirror_vfd$(EXEEXT) $(am__EXEEXT_2)
@HAVE_SHARED_CONDITIONAL_TRUE@am__append_3 = filter_plugin vol_plugin
@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_3)
@DIRECT_VFD_CONDITIONAL_TRUE@am__append_4 = direct
@@ -135,6 +136,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
$(top_srcdir)/m4/ax_check_junit.m4 \
$(top_srcdir)/m4/ax_java_options.m4 \
$(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_doxygen.m4 \
$(top_srcdir)/m4/ax_prog_jar.m4 \
$(top_srcdir)/m4/ax_prog_java.m4 \
$(top_srcdir)/m4/ax_prog_java_works.m4 \
@@ -155,7 +157,8 @@ CONFIG_CLEAN_FILES = H5srcdir_str.h testabort_fail.sh \
testcheck_version.sh testerror.sh testexternal_env.sh \
testflushrefresh.sh testlibinfo.sh testlinks_env.sh \
testswmr.sh testvds_env.sh testvdsswmr.sh \
- test_filter_plugin.sh test_usecases.sh test_vol_plugin.sh
+ test_filter_plugin.sh test_mirror.sh test_usecases.sh \
+ test_vol_plugin.sh
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libfilter_plugin1_dsets_la_LIBADD =
@@ -234,11 +237,11 @@ 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) chunk_info$(EXEEXT) cmpd_dset$(EXEEXT) \
- filter_fail$(EXEEXT) extend$(EXEEXT) direct_chunk$(EXEEXT) \
- external$(EXEEXT) efc$(EXEEXT) objcopy$(EXEEXT) \
- objcopy_ref$(EXEEXT) links$(EXEEXT) unlink$(EXEEXT) \
- twriteorder$(EXEEXT) big$(EXEEXT) mtime$(EXEEXT) \
- fillval$(EXEEXT) mount$(EXEEXT) flush1$(EXEEXT) \
+ cmpd_dtransform$(EXEEXT) filter_fail$(EXEEXT) extend$(EXEEXT) \
+ direct_chunk$(EXEEXT) external$(EXEEXT) efc$(EXEEXT) \
+ objcopy$(EXEEXT) objcopy_ref$(EXEEXT) links$(EXEEXT) \
+ unlink$(EXEEXT) twriteorder$(EXEEXT) big$(EXEEXT) \
+ mtime$(EXEEXT) fillval$(EXEEXT) mount$(EXEEXT) flush1$(EXEEXT) \
flush2$(EXEEXT) app_ref$(EXEEXT) enum$(EXEEXT) \
set_extent$(EXEEXT) ttsafe$(EXEEXT) enc_dec_plist$(EXEEXT) \
enc_dec_plist_cross_platform$(EXEEXT) getname$(EXEEXT) \
@@ -247,7 +250,7 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \
reserved$(EXEEXT) cross_read$(EXEEXT) freespace$(EXEEXT) \
mf$(EXEEXT) vds$(EXEEXT) file_image$(EXEEXT) \
unregister$(EXEEXT) cache_logging$(EXEEXT) cork$(EXEEXT) \
- swmr$(EXEEXT) vol$(EXEEXT)
+ swmr$(EXEEXT) thread_id$(EXEEXT) vol$(EXEEXT) timer$(EXEEXT)
@HAVE_SHARED_CONDITIONAL_TRUE@am__EXEEXT_2 = filter_plugin$(EXEEXT) \
@HAVE_SHARED_CONDITIONAL_TRUE@ vol_plugin$(EXEEXT)
am__EXEEXT_3 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \
@@ -321,6 +324,10 @@ cmpd_dset_SOURCES = cmpd_dset.c
cmpd_dset_OBJECTS = cmpd_dset.$(OBJEXT)
cmpd_dset_LDADD = $(LDADD)
cmpd_dset_DEPENDENCIES = libh5test.la $(LIBHDF5)
+cmpd_dtransform_SOURCES = cmpd_dtransform.c
+cmpd_dtransform_OBJECTS = cmpd_dtransform.$(OBJEXT)
+cmpd_dtransform_LDADD = $(LDADD)
+cmpd_dtransform_DEPENDENCIES = libh5test.la $(LIBHDF5)
cork_SOURCES = cork.c
cork_OBJECTS = cork.$(OBJEXT)
cork_LDADD = $(LDADD)
@@ -562,6 +569,10 @@ mf_SOURCES = mf.c
mf_OBJECTS = mf.$(OBJEXT)
mf_LDADD = $(LDADD)
mf_DEPENDENCIES = libh5test.la $(LIBHDF5)
+am_mirror_vfd_OBJECTS = mirror_vfd.$(OBJEXT) genall5.$(OBJEXT)
+mirror_vfd_OBJECTS = $(am_mirror_vfd_OBJECTS)
+mirror_vfd_LDADD = $(LDADD)
+mirror_vfd_DEPENDENCIES = libh5test.la $(LIBHDF5)
mount_SOURCES = mount.c
mount_OBJECTS = mount.$(OBJEXT)
mount_LDADD = $(LDADD)
@@ -673,8 +684,8 @@ am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) tarray.$(OBJEXT) \
titerate.$(OBJEXT) tmeta.$(OBJEXT) tmisc.$(OBJEXT) \
trefer.$(OBJEXT) trefer_deprec.$(OBJEXT) trefstr.$(OBJEXT) \
tselect.$(OBJEXT) tskiplist.$(OBJEXT) tsohm.$(OBJEXT) \
- ttime.$(OBJEXT) ttst.$(OBJEXT) tunicode.$(OBJEXT) \
- tvlstr.$(OBJEXT) tvltypes.$(OBJEXT)
+ ttime.$(OBJEXT) tunicode.$(OBJEXT) tvlstr.$(OBJEXT) \
+ tvltypes.$(OBJEXT)
testhdf5_OBJECTS = $(am_testhdf5_OBJECTS)
testhdf5_LDADD = $(LDADD)
testhdf5_DEPENDENCIES = libh5test.la $(LIBHDF5)
@@ -682,9 +693,18 @@ testmeta_SOURCES = testmeta.c
testmeta_OBJECTS = testmeta.$(OBJEXT)
testmeta_LDADD = $(LDADD)
testmeta_DEPENDENCIES = libh5test.la $(LIBHDF5)
+thread_id_SOURCES = thread_id.c
+thread_id_OBJECTS = thread_id.$(OBJEXT)
+thread_id_LDADD = $(LDADD)
+thread_id_DEPENDENCIES = libh5test.la $(LIBHDF5)
+timer_SOURCES = timer.c
+timer_OBJECTS = timer.$(OBJEXT)
+timer_LDADD = $(LDADD)
+timer_DEPENDENCIES = libh5test.la $(LIBHDF5)
am_ttsafe_OBJECTS = ttsafe.$(OBJEXT) ttsafe_dcreate.$(OBJEXT) \
ttsafe_error.$(OBJEXT) ttsafe_cancel.$(OBJEXT) \
- ttsafe_acreate.$(OBJEXT)
+ ttsafe_acreate.$(OBJEXT) ttsafe_attr_vlen.$(OBJEXT) \
+ ttsafe_rec_rw_lock.$(OBJEXT)
ttsafe_OBJECTS = $(am_ttsafe_OBJECTS)
ttsafe_LDADD = $(LDADD)
ttsafe_DEPENDENCIES = libh5test.la $(LIBHDF5)
@@ -705,6 +725,12 @@ am_use_append_chunk_OBJECTS = use_append_chunk.$(OBJEXT) \
use_append_chunk_OBJECTS = $(am_use_append_chunk_OBJECTS)
use_append_chunk_LDADD = $(LDADD)
use_append_chunk_DEPENDENCIES = libh5test.la $(LIBHDF5)
+am_use_append_chunk_mirror_OBJECTS = \
+ use_append_chunk_mirror.$(OBJEXT) use_common.$(OBJEXT)
+use_append_chunk_mirror_OBJECTS = \
+ $(am_use_append_chunk_mirror_OBJECTS)
+use_append_chunk_mirror_LDADD = $(LDADD)
+use_append_chunk_mirror_DEPENDENCIES = libh5test.la $(LIBHDF5)
am_use_append_mchunks_OBJECTS = use_append_mchunks.$(OBJEXT) \
use_common.$(OBJEXT)
use_append_mchunks_OBJECTS = $(am_use_append_mchunks_OBJECTS)
@@ -790,11 +816,11 @@ SOURCES = $(libfilter_plugin1_dsets_la_SOURCES) \
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 \
- chunk_info.c cmpd_dset.c cork.c cross_read.c dangle.c \
- del_many_dense_attrs.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 \
+ chunk_info.c cmpd_dset.c cmpd_dtransform.c cork.c cross_read.c \
+ dangle.c del_many_dense_attrs.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 \
external_env.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 \
@@ -803,16 +829,18 @@ SOURCES = $(libfilter_plugin1_dsets_la_SOURCES) \
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 hdfs.c \
- hyperslab.c istore.c lheap.c links.c links_env.c mf.c mount.c \
- mtime.c ntypes.c objcopy.c objcopy_ref.c ohdr.c page_buffer.c \
- pool.c reserved.c ros3.c s3comms.c set_extent.c \
- space_overflow.c stab.c swmr.c swmr_addrem_writer.c \
- swmr_check_compat_vfd.c swmr_generator.c swmr_reader.c \
- swmr_remove_reader.c swmr_remove_writer.c swmr_sparse_reader.c \
- swmr_sparse_writer.c swmr_start_write.c swmr_writer.c \
- tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
- $(ttsafe_SOURCES) twriteorder.c unlink.c unregister.c \
- $(use_append_chunk_SOURCES) $(use_append_mchunks_SOURCES) \
+ hyperslab.c istore.c lheap.c links.c links_env.c mf.c \
+ $(mirror_vfd_SOURCES) mount.c mtime.c ntypes.c objcopy.c \
+ objcopy_ref.c ohdr.c page_buffer.c pool.c reserved.c ros3.c \
+ s3comms.c set_extent.c space_overflow.c stab.c swmr.c \
+ swmr_addrem_writer.c swmr_check_compat_vfd.c swmr_generator.c \
+ swmr_reader.c swmr_remove_reader.c swmr_remove_writer.c \
+ swmr_sparse_reader.c swmr_sparse_writer.c swmr_start_write.c \
+ swmr_writer.c tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ thread_id.c timer.c $(ttsafe_SOURCES) twriteorder.c unlink.c \
+ unregister.c $(use_append_chunk_SOURCES) \
+ $(use_append_chunk_mirror_SOURCES) \
+ $(use_append_mchunks_SOURCES) \
$(use_disable_mdc_flushes_SOURCES) vds.c vds_env.c \
vds_swmr_gen.c vds_swmr_reader.c vds_swmr_writer.c vfd.c vol.c \
vol_plugin.c
@@ -825,11 +853,11 @@ DIST_SOURCES = $(am__libfilter_plugin1_dsets_la_SOURCES_DIST) \
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 \
- chunk_info.c cmpd_dset.c cork.c cross_read.c dangle.c \
- del_many_dense_attrs.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 \
+ chunk_info.c cmpd_dset.c cmpd_dtransform.c cork.c cross_read.c \
+ dangle.c del_many_dense_attrs.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 \
external_env.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 \
@@ -838,16 +866,18 @@ DIST_SOURCES = $(am__libfilter_plugin1_dsets_la_SOURCES_DIST) \
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 hdfs.c \
- hyperslab.c istore.c lheap.c links.c links_env.c mf.c mount.c \
- mtime.c ntypes.c objcopy.c objcopy_ref.c ohdr.c page_buffer.c \
- pool.c reserved.c ros3.c s3comms.c set_extent.c \
- space_overflow.c stab.c swmr.c swmr_addrem_writer.c \
- swmr_check_compat_vfd.c swmr_generator.c swmr_reader.c \
- swmr_remove_reader.c swmr_remove_writer.c swmr_sparse_reader.c \
- swmr_sparse_writer.c swmr_start_write.c swmr_writer.c \
- tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
- $(ttsafe_SOURCES) twriteorder.c unlink.c unregister.c \
- $(use_append_chunk_SOURCES) $(use_append_mchunks_SOURCES) \
+ hyperslab.c istore.c lheap.c links.c links_env.c mf.c \
+ $(mirror_vfd_SOURCES) mount.c mtime.c ntypes.c objcopy.c \
+ objcopy_ref.c ohdr.c page_buffer.c pool.c reserved.c ros3.c \
+ s3comms.c set_extent.c space_overflow.c stab.c swmr.c \
+ swmr_addrem_writer.c swmr_check_compat_vfd.c swmr_generator.c \
+ swmr_reader.c swmr_remove_reader.c swmr_remove_writer.c \
+ swmr_sparse_reader.c swmr_sparse_writer.c swmr_start_write.c \
+ swmr_writer.c tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ thread_id.c timer.c $(ttsafe_SOURCES) twriteorder.c unlink.c \
+ unregister.c $(use_append_chunk_SOURCES) \
+ $(use_append_chunk_mirror_SOURCES) \
+ $(use_append_mchunks_SOURCES) \
$(use_disable_mdc_flushes_SOURCES) vds.c vds_env.c \
vds_swmr_gen.c vds_swmr_reader.c vds_swmr_writer.c vfd.c vol.c \
vol_plugin.c
@@ -1078,7 +1108,7 @@ TEST_LOGS = $(am__test_logs2:.sh.log=.log)
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.in \
- $(srcdir)/test_filter_plugin.sh.in \
+ $(srcdir)/test_filter_plugin.sh.in $(srcdir)/test_mirror.sh.in \
$(srcdir)/test_usecases.sh.in $(srcdir)/test_vol_plugin.sh.in \
$(srcdir)/testabort_fail.sh.in \
$(srcdir)/testcheck_version.sh.in $(srcdir)/testerror.sh.in \
@@ -1088,7 +1118,7 @@ am__DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.in \
$(srcdir)/testvds_env.sh.in $(srcdir)/testvdsswmr.sh.in \
$(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \
$(top_srcdir)/config/commence.am \
- $(top_srcdir)/config/conclude.am COPYING
+ $(top_srcdir)/config/conclude.am
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
@@ -1096,7 +1126,7 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
@@ -1122,6 +1152,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -1138,11 +1169,54 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
-DEV_WARNINGS = @DEV_WARNINGS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
+DIAGS = @DIAGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
+DOXYGEN_EXAMPLES_DIRECTORY = @DOXYGEN_EXAMPLES_DIRECTORY@
+DOXYGEN_EXTERNAL_SEARCH = @DOXYGEN_EXTERNAL_SEARCH@
+DOXYGEN_HTML_EXTRA_FILES = @DOXYGEN_HTML_EXTRA_FILES@
+DOXYGEN_HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@
+DOXYGEN_HTML_FOOTER = @DOXYGEN_HTML_FOOTER@
+DOXYGEN_HTML_HEADER = @DOXYGEN_HTML_HEADER@
+DOXYGEN_INCLUDE_ALIASES = @DOXYGEN_INCLUDE_ALIASES@
+DOXYGEN_INPUT_DIRECTORY = @DOXYGEN_INPUT_DIRECTORY@
+DOXYGEN_LAYOUT_FILE = @DOXYGEN_LAYOUT_FILE@
+DOXYGEN_MACRO_EXPANSION = @DOXYGEN_MACRO_EXPANSION@
+DOXYGEN_OPTIMIZE_OUTPUT_FOR_C = @DOXYGEN_OPTIMIZE_OUTPUT_FOR_C@
+DOXYGEN_OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIRECTORY@
+DOXYGEN_PACKAGE = @DOXYGEN_PACKAGE@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DOXYGEN_PROJECT_BRIEF = @DOXYGEN_PROJECT_BRIEF@
+DOXYGEN_PROJECT_LOGO = @DOXYGEN_PROJECT_LOGO@
+DOXYGEN_SEARCHENGINE_URL = @DOXYGEN_SEARCHENGINE_URL@
+DOXYGEN_SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@
+DOXYGEN_VERSION_STRING = @DOXYGEN_VERSION_STRING@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -1176,6 +1250,7 @@ H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -1186,6 +1261,7 @@ HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@
HAVE_LIBHDFS = @HAVE_LIBHDFS@
HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_DOXYGEN = @HDF5_DOXYGEN@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF5_TESTS = @HDF5_TESTS@
@@ -1198,6 +1274,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -1235,6 +1312,7 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAP_API = @MAP_API@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -1271,6 +1349,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PREADWRITE = @PREADWRITE@
PROFILING = @PROFILING@
RANLIB = @RANLIB@
+RECURSIVE_RW_LOCKS = @RECURSIVE_RW_LOCKS@
ROOT = @ROOT@
ROS3_VFD = @ROS3_VFD@
RUNPARALLEL = @RUNPARALLEL@
@@ -1294,6 +1373,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -1386,15 +1466,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -1427,13 +1507,14 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \
partial_chunks.h5 layout_extend.h5 zero_chunk.h5 \
chunk_single.h5 swmr_non_latest.h5 earray_hdr_fd.h5 \
farray_hdr_fd.h5 bt2_hdr_fd.h5 storage_size.h5 \
- dls_01_strings.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 \
+ dls_01_strings.h5 power2up.h5 version_bounds.h5 \
+ alloc_0sized.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 \
links*.h5 sys_file1 tfile[1-7].h5 th5s[1-4].h5 lheap.h5 \
fheap.h5 ohdr.h5 stab.h5 extern_[1-5].h5 extern_[1-4][rw].raw \
gheap[0-4].h5 ohdr_min_a.h5 ohdr_min_b.h5 \
min_dset_ohdr_testfile.h5 dt_arith[1-2] links.h5 \
links[0-6]*.h5 extlinks[0-15].h5 tmp tmp_links tmp2_links \
- tmp_links_env tmp_vds_env big.data \
+ tmp_links_env tmp_vds tmp_vds_env big.data \
big[0-9][0-9][0-9][0-9][0-9].h5 stdio.h5 sec2.h5 \
dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \
tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \
@@ -1450,9 +1531,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \
error_test.h5 err_compat.h5 dtransform.h5 test_filters.h5 \
get_file_name.h5 tstint[1-2].h5 unlink_chunked.h5 btree2.h5 \
btree2_tmp.h5 objcopy_src.h5 objcopy_dst.h5 objcopy_ext.dat \
- trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 farray_tmp.h5 \
- earray.h5 earray_tmp.h5 efc[0-5].h5 log_vfd_out.log \
- log_ros3_out.log log_s3comms_out.log new_multi_file_v16-r.h5 \
+ app_ref.h5 farray.h5 farray_tmp.h5 earray.h5 earray_tmp.h5 \
+ efc[0-5].h5 log_vfd_out.log log_ros3_out.log \
+ log_s3comms_out.log new_multi_file_v16-r.h5 \
new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \
split_get_file_image_test-r.h5 file_image_core_test.h5.copy \
unregister_filter_1.h5 unregister_filter_2.h5 vds_virt.h5 \
@@ -1462,12 +1543,14 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \
flushrefresh_VERIFICATION_START \
flushrefresh_VERIFICATION_CHECKPOINT1 \
flushrefresh_VERIFICATION_CHECKPOINT2 \
- flushrefresh_VERIFICATION_DONE atomic_data accum_swmr_big.h5 \
+ flushrefresh_VERIFICATION_DONE filenotclosed.h5 \
+ del_many_dense_attrs.h5 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 direct_chunk.h5 \
- native_vol_test.h5
+ native_vol_test.h5 splitter*.h5 splitter.log mirror_rw \
+ mirror_ro
# Test scripts--
# testerror.sh: err_compat, error_test
@@ -1481,11 +1564,13 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \
# testvdsswmr.sh: vds_swmr*
# testabort_fail.sh: filenotclosed.c and del_many_dense_attrs.c
# test_filter_plugin.sh: filter_plugin.c
+# test_mirror.sh: mirror_vfd ../utils/mirror_vfd/*
# 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 testexternal_env.sh testswmr.sh \
testvds_env.sh testvdsswmr.sh testflushrefresh.sh \
- test_usecases.sh testabort_fail.sh $(am__append_1)
+ test_usecases.sh testabort_fail.sh test_mirror.sh \
+ $(am__append_1)
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) \
links_env$(EXEEXT) external_env$(EXEEXT) \
filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \
@@ -1508,12 +1593,13 @@ 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 chunk_info cmpd_dset filter_fail extend direct_chunk \
- external efc objcopy objcopy_ref links unlink twriteorder big mtime fillval mount \
+ dtypes dsets chunk_info cmpd_dset cmpd_dtransform filter_fail extend direct_chunk \
+ external efc objcopy objcopy_ref 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 ros3 s3comms hdfs ntypes \
dangle dtransform reserved cross_read freespace mf vds file_image \
- unregister cache_logging cork swmr vol
+ unregister cache_logging cork swmr thread_id vol timer
# These programs generate test files for the tests. They don't need to be
@@ -1549,9 +1635,10 @@ LDADD = libh5test.la $(LIBHDF5)
# List the source files for tests that have more than one
ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
- ttsafe_acreate.c
+ ttsafe_acreate.c ttsafe_attr_vlen.c ttsafe_rec_rw_lock.c
cache_image_SOURCES = cache_image.c genall5.c
+mirror_vfd_SOURCES = mirror_vfd.c genall5.c
VFD_LIST = sec2 stdio core core_paged split multi family \
$(am__append_4)
@@ -1564,19 +1651,20 @@ VOL_LIST = native "pass_through under_vol=0;under_info={}" \
# Sources for testhdf5 executable
testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
tgenprop.c th5o.c th5s.c tcoords.c theap.c tid.c titerate.c tmeta.c tmisc.c \
- trefer.c trefer_deprec.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c ttst.c tunicode.c \
+ trefer.c trefer_deprec.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c tunicode.c \
tvlstr.c tvltypes.c
# Sources for Use Cases
use_append_chunk_SOURCES = use_append_chunk.c use_common.c
+use_append_chunk_mirror_SOURCES = use_append_chunk_mirror.c use_common.c
use_append_mchunks_SOURCES = use_append_mchunks.c use_common.c
use_disable_mdc_flushes_SOURCES = use_disable_mdc_flushes.c
# Temporary files.
DISTCLEANFILES = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filter_plugin.sh \
- testexternal_env.sh testswmr.sh testvds_env.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh testabort_fail.sh \
- test_vol_plugin.sh
+ testexternal_env.sh testswmr.sh testvds_env.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh \
+ testabort_fail.sh test_vol_plugin.sh test_mirror.sh
# Automake needs to be taught how to build lib, progs and tests targets.
@@ -1590,7 +1678,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1657,6 +1745,8 @@ testvdsswmr.sh: $(top_builddir)/config.status $(srcdir)/testvdsswmr.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_filter_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_filter_plugin.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+test_mirror.sh: $(top_builddir)/config.status $(srcdir)/test_mirror.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_usecases.sh: $(top_builddir)/config.status $(srcdir)/test_usecases.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_vol_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_vol_plugin.sh.in
@@ -1769,6 +1859,10 @@ cmpd_dset$(EXEEXT): $(cmpd_dset_OBJECTS) $(cmpd_dset_DEPENDENCIES) $(EXTRA_cmpd_
@rm -f cmpd_dset$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(cmpd_dset_OBJECTS) $(cmpd_dset_LDADD) $(LIBS)
+cmpd_dtransform$(EXEEXT): $(cmpd_dtransform_OBJECTS) $(cmpd_dtransform_DEPENDENCIES) $(EXTRA_cmpd_dtransform_DEPENDENCIES)
+ @rm -f cmpd_dtransform$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(cmpd_dtransform_OBJECTS) $(cmpd_dtransform_LDADD) $(LIBS)
+
cork$(EXEEXT): $(cork_OBJECTS) $(cork_DEPENDENCIES) $(EXTRA_cork_DEPENDENCIES)
@rm -f cork$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(cork_OBJECTS) $(cork_LDADD) $(LIBS)
@@ -2009,6 +2103,10 @@ mf$(EXEEXT): $(mf_OBJECTS) $(mf_DEPENDENCIES) $(EXTRA_mf_DEPENDENCIES)
@rm -f mf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(mf_OBJECTS) $(mf_LDADD) $(LIBS)
+mirror_vfd$(EXEEXT): $(mirror_vfd_OBJECTS) $(mirror_vfd_DEPENDENCIES) $(EXTRA_mirror_vfd_DEPENDENCIES)
+ @rm -f mirror_vfd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mirror_vfd_OBJECTS) $(mirror_vfd_LDADD) $(LIBS)
+
mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES)
@rm -f mount$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS)
@@ -2121,6 +2219,14 @@ testmeta$(EXEEXT): $(testmeta_OBJECTS) $(testmeta_DEPENDENCIES) $(EXTRA_testmeta
@rm -f testmeta$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testmeta_OBJECTS) $(testmeta_LDADD) $(LIBS)
+thread_id$(EXEEXT): $(thread_id_OBJECTS) $(thread_id_DEPENDENCIES) $(EXTRA_thread_id_DEPENDENCIES)
+ @rm -f thread_id$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(thread_id_OBJECTS) $(thread_id_LDADD) $(LIBS)
+
+timer$(EXEEXT): $(timer_OBJECTS) $(timer_DEPENDENCIES) $(EXTRA_timer_DEPENDENCIES)
+ @rm -f timer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(timer_OBJECTS) $(timer_LDADD) $(LIBS)
+
ttsafe$(EXEEXT): $(ttsafe_OBJECTS) $(ttsafe_DEPENDENCIES) $(EXTRA_ttsafe_DEPENDENCIES)
@rm -f ttsafe$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ttsafe_OBJECTS) $(ttsafe_LDADD) $(LIBS)
@@ -2141,6 +2247,10 @@ use_append_chunk$(EXEEXT): $(use_append_chunk_OBJECTS) $(use_append_chunk_DEPEND
@rm -f use_append_chunk$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(use_append_chunk_OBJECTS) $(use_append_chunk_LDADD) $(LIBS)
+use_append_chunk_mirror$(EXEEXT): $(use_append_chunk_mirror_OBJECTS) $(use_append_chunk_mirror_DEPENDENCIES) $(EXTRA_use_append_chunk_mirror_DEPENDENCIES)
+ @rm -f use_append_chunk_mirror$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(use_append_chunk_mirror_OBJECTS) $(use_append_chunk_mirror_LDADD) $(LIBS)
+
use_append_mchunks$(EXEEXT): $(use_append_mchunks_OBJECTS) $(use_append_mchunks_DEPENDENCIES) $(EXTRA_use_append_mchunks_DEPENDENCIES)
@rm -f use_append_mchunks$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(use_append_mchunks_OBJECTS) $(use_append_mchunks_LDADD) $(LIBS)
@@ -2203,6 +2313,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache_tagging.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk_info.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmpd_dset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmpd_dtransform.Po@am__quote@
@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@
@@ -2270,6 +2381,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/links.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/links_env.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mirror_vfd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntypes.Po@am__quote@
@@ -2311,7 +2423,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5o.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5s.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread_id.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/titerate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmeta.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmisc.Po@am__quote@
@@ -2324,10 +2438,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_acreate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_attr_vlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_cancel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_dcreate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_error.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_rec_rw_lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunicode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvltypes.Po@am__quote@
@@ -2335,6 +2450,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unregister.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/use_append_chunk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/use_append_chunk_mirror.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/use_append_mchunks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/use_common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/use_disable_mdc_flushes.Po@am__quote@
@@ -2734,6 +2850,13 @@ cmpd_dset.log: cmpd_dset$(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)
+cmpd_dtransform.log: cmpd_dtransform$(EXEEXT)
+ @p='cmpd_dtransform$(EXEEXT)'; \
+ b='cmpd_dtransform'; \
+ $(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)
filter_fail.log: filter_fail$(EXEEXT)
@p='filter_fail$(EXEEXT)'; \
b='filter_fail'; \
@@ -3014,6 +3137,13 @@ swmr.log: swmr$(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)
+thread_id.log: thread_id$(EXEEXT)
+ @p='thread_id$(EXEEXT)'; \
+ b='thread_id'; \
+ $(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)
vol.log: vol$(EXEEXT)
@p='vol$(EXEEXT)'; \
b='vol'; \
@@ -3021,6 +3151,13 @@ vol.log: vol$(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)
+timer.log: timer$(EXEEXT)
+ @p='timer$(EXEEXT)'; \
+ b='timer'; \
+ $(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)
.sh.log:
@p='$<'; \
$(am__set_b); \
@@ -3202,9 +3339,9 @@ uninstall-am:
# commands that should be executed even if a file with the same name already
# exists.
.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
- build-tests check-clean check-install check-p check-s check-vfd \
- check-passthrough-vol install-doc lib progs tests uninstall-doc \
- _exec_check-s _test help
+ build-tests check-clean check-install check-p check-s check-vfd \
+ check-passthrough-vol install-doc lib progs tests uninstall-doc \
+ _exec_check-s _test help trace doxygen
help:
@$(top_srcdir)/bin/makehelp
diff --git a/test/SWMR_UseCase_UG.txt b/test/SWMR_UseCase_UG.txt
index e29944a..1e3d1e6 100644
--- a/test/SWMR_UseCase_UG.txt
+++ b/test/SWMR_UseCase_UG.txt
@@ -6,12 +6,12 @@
case program and explain how to run them.
2.1. Author and Dates:
- Version 2: By Albert Cheng (acheng@hdfgroup.org), 2013/06/18.
- Version 1: By Albert Cheng (acheng@hdfgroup.org), 2013/06/01.
+ Version 2: By Albert Cheng, 2013/06/18.
+ Version 1: By Albert Cheng, 2013/06/01.
%%%%Use Case 1.7%%%%
-
+
3. Use Case [1.7]:
Appending a single chunk
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 98f3daf..b28bbd6 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -5,7 +5,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -23,8 +23,7 @@ if (UNIX)
##############################################################################
# configure scripts to test dir
##############################################################################
- find_package (Perl)
- if (PERL_FOUND)
+ if (H5_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)
@@ -198,18 +197,22 @@ if (UNIX)
# testvdsswmr.sh: vds_swmr*
add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh)
set_tests_properties (H5SHELL-testflushrefresh PROPERTIES
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
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
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
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
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
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
+ ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
diff --git a/test/accum.c b/test/accum.c
index 5af5282..47aae39 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1963,10 +1963,10 @@ test_random_write(H5F_t *f)
/* Choose random # seed */
seed = (unsigned)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned)1155438845; */
- HDfprintf(stderr, "Random # seed was: %u\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned)1155438845; */
+HDfprintf(stderr, "Random # seed was: %u\n", seed);
+#endif
HDsrandom(seed);
/* Allocate space for the segment length buffer */
@@ -2074,13 +2074,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_swmr_write_big
*
- * Purpose: A SWMR test: verifies that writing "large" metadata to a file
- * opened with SWMR_WRITE will flush the existing metadata in the
- * accumulator to disk first before writing the "large" metadata
- * to disk.
- * This test will fork and exec a reader "accum_swmr_reader" which
- * opens the same file with SWMR_READ and verifies that the correct
- * metadata is read from disk.
+ * Purpose: A SWMR test: verifies that writing "large" metadata to a file
+ * opened with SWMR_WRITE will flush the existing metadata in the
+ * accumulator to disk first before writing the "large" metadata
+ * to disk.
+ *
+ * This test will fork and exec a reader "accum_swmr_reader" which
+ * opens the same file with SWMR_READ and verifies that the correct
+ * metadata is read from disk.
*
* Return: Success: 0
* Failure: 1
@@ -2092,6 +2093,7 @@ error:
unsigned
test_swmr_write_big(hbool_t newest_format)
{
+
hid_t fid = -1; /* File ID */
hid_t fapl = -1; /* File access property list */
H5F_t * rf = NULL; /* File pointer */
@@ -2099,26 +2101,23 @@ test_swmr_write_big(hbool_t newest_format)
uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */
uint8_t wbuf[1024]; /* Buffer for reading & writing */
unsigned u; /* Local index variable */
-#ifdef H5_HAVE_UNISTD_H
- pid_t pid; /* Process ID */
-#endif /* H5_HAVE_UNISTD_H */
- int status; /* Status returned from child process */
- char * driver = NULL; /* VFD string (from env variable) */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hbool_t process_success = FALSE;
+ 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")
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
+#if !defined(H5_HAVE_UNISTD_H) && !defined(H5_HAVE_WIN32_API)
+ /* Not a Windows or POSIX system */
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ HDputs(" Test skipped: Not a Windows or POSIX system.");
return 0;
-#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
-
+#else
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
@@ -2228,56 +2227,94 @@ test_swmr_write_big(hbool_t newest_format)
if (HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
TEST_ERROR;
- /* Fork child process to verify that the data at [1024, 2014] does get written to disk */
- if ((pid = HDfork()) < 0) {
- HDperror("fork");
- FAIL_STACK_ERROR;
- }
- else if (0 == pid) { /* Child process */
- /* By convention, argv[0] tells the name of program invoked.
- *
- * execv on NetBSD 8 will actually return EFAULT if there is a
- * NULL at argv[0], so we follow the convention unconditionally.
- */
- char swmr_reader[] = SWMR_READER;
- char *const new_argv[] = {swmr_reader, NULL};
- /* Run the reader */
- status = HDexecv(SWMR_READER, new_argv);
- HDprintf("errno from execv = %s\n", strerror(errno));
- FAIL_STACK_ERROR;
- } /* end if */
+#if defined(H5_HAVE_WIN32_API)
+ {
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ DWORD exit_code = EXIT_FAILURE;
- /* Parent process -- wait for the child process to complete */
- while (pid != HDwaitpid(pid, &status, 0))
- /*void*/;
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ ZeroMemory(&pi, sizeof(pi));
- /* Check if child process terminates normally and its return value */
- if (WIFEXITED(status) && !WEXITSTATUS(status)) {
- /* Flush the accumulator */
- if (accum_reset(rf) < 0)
+ if (0 == CreateProcess(NULL, SWMR_READER, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ HDprintf("CreateProcess failed (%d).\n", GetLastError());
FAIL_STACK_ERROR;
+ }
- /* Close and remove the file */
- if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR;
+ (void)WaitForSingleObject(pi.hProcess, INFINITE);
+
+ if (FALSE == GetExitCodeProcess(pi.hProcess, &exit_code) || EXIT_FAILURE == exit_code)
+ process_success = FALSE;
+ else
+ process_success = TRUE;
- /* Close the property list */
- if (H5Pclose(fapl) < 0)
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+#else /* defined(H5_HAVE_WIN32_API) */
+ {
+ pid_t pid; /* Process ID */
+ int status; /* Status returned from child process */
+
+ /* Fork child process to verify that the data at [1024, 2014] does get written to disk */
+ if ((pid = HDfork()) < 0) {
+ HDperror("fork");
+ FAIL_STACK_ERROR;
+ }
+ else if (0 == pid) { /* Child process */
+ /* By convention, argv[0] tells the name of program invoked.
+ *
+ * execv on NetBSD 8 will actually return EFAULT if there is a
+ * NULL at argv[0], so we follow the convention unconditionally.
+ */
+ char swmr_reader[] = SWMR_READER;
+ char *const new_argv[] = {swmr_reader, NULL};
+ /* Run the reader */
+ status = HDexecv(SWMR_READER, new_argv);
+ HDprintf("errno from execv = %s\n", HDstrerror(errno));
FAIL_STACK_ERROR;
+ } /* end if */
- /* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
- FAIL_STACK_ERROR
- api_ctx_pushed = FALSE;
-
- /* Release memory */
- if (wbuf2)
- HDfree(wbuf2);
- if (rbuf)
- HDfree(rbuf);
- PASSED();
- return 0;
- } /* end if */
+ /* Parent process -- wait for the child process to complete */
+ while (pid != HDwaitpid(pid, &status, 0))
+ /*void*/;
+
+ /* Check if child process terminates normally and its return value */
+ if (WIFEXITED(status) && !WEXITSTATUS(status))
+ process_success = TRUE;
+ }
+#endif /* defined(H5_HAVE_WIN32_API) */
+
+ /* Check if the process terminated correctly */
+ if (!process_success)
+ FAIL_PUTS_ERROR("child process exited abnormally")
+
+ /* Flush the accumulator */
+ if (accum_reset(rf) < 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;
+
+ /* Pop API context */
+ if (api_ctx_pushed && H5CX_pop() < 0)
+ FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
+ /* Release memory */
+ if (wbuf2)
+ HDfree(wbuf2);
+ if (rbuf)
+ HDfree(rbuf);
+
+ PASSED();
+ return 0;
error:
/* Closing and remove the file */
@@ -2296,7 +2333,7 @@ error:
return 1;
-#endif
+#endif /* !defined(H5_HAVE_UNISTD_H) && !defined(H5_HAVE_WIN32_API) */
} /* end test_swmr_write_big() */
@@ -2329,16 +2366,18 @@ accum_printf(const H5F_t *f)
HDprintf("=====================================================\n");
HDprintf(" accumulator allocated size == %zu\n", accum->alloc_size);
HDprintf(" accumulated data size == %zu\n", accum->size);
- HDfprintf(stdout, " accumulator dirty? == %t\n", accum->dirty);
+ HDfprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE");
HDprintf("=====================================================\n");
- HDfprintf(stdout, " start of accumulated data, loc = %a\n", accum->loc);
+ HDfprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc);
if (accum->dirty) {
- HDfprintf(stdout, " start of dirty region, loc = %a\n", (haddr_t)(accum->loc + accum->dirty_off));
- HDfprintf(stdout, " end of dirty region, loc = %a\n",
+ HDfprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->dirty_off));
+ HDfprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n",
(haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len));
} /* end if */
- HDfprintf(stdout, " end of accumulated data, loc = %a\n", (haddr_t)(accum->loc + accum->size));
- HDfprintf(stdout, " end of accumulator allocation, loc = %a\n",
+ HDfprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n",
+ (haddr_t)(accum->loc + accum->size));
+ HDfprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n",
(haddr_t)(accum->loc + accum->alloc_size));
HDprintf("=====================================================\n");
}
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 1d48d43..ffa81e5 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/app_ref.c b/test/app_ref.c
index 275f60b..09cfb72 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, August 14, 2008
*
* Purpose: Tests closing the library after reference counts have been
diff --git a/test/atomic_reader.c b/test/atomic_reader.c
index d849631..c8bbbae 100644
--- a/test/atomic_reader.c
+++ b/test/atomic_reader.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/atomic_writer.c b/test/atomic_writer.c
index 0f86f7b..5a6310a 100644
--- a/test/atomic_writer.c
+++ b/test/atomic_writer.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/big.c b/test/big.c
index 1f45fb4..36fb27d 100644
--- a/test/big.c
+++ b/test/big.c
@@ -6,16 +6,16 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
- * Modified: Albert Cheng <acheng@hdfgroup.org>
- * September 11, 2010
+ * Modified: Albert Cheng
+ * September 11, 2010
*/
/*
* The purpose of this test is to verify if a virtual file driver can handle:
@@ -93,17 +93,17 @@ static int test_family(hid_t fapl);
static hsize_t values_used[WRT_N];
/*-------------------------------------------------------------------------
- * Function: randll
+ * Function: randll
*
- * Purpose: Create a random long long value.
- * Ensures that a write at this value doesn't overlap any
- * previous write.
+ * Purpose: Create a random long long value.
+ * Ensures that a write at this value doesn't overlap any
+ * previous write.
*
- * Return: Success: Random value
+ * Return: Success: Random value
*
- * Failure: Random value which overlaps another write
+ * Failure: Random value which overlaps another write
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Modifications:
@@ -141,17 +141,17 @@ randll(hsize_t limit, int current_index)
}
/*-------------------------------------------------------------------------
- * Function: is_sparse
+ * Function: is_sparse
*
- * Purpose: Determines if the file system of the current working
- * directory supports holes.
+ * Purpose: Determines if the file system of the current working
+ * directory supports holes.
*
- * Return: Success: Non-zero if holes are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if holes are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, July 15, 1998
*
* Modifications:
@@ -184,17 +184,17 @@ is_sparse(void)
}
/*-------------------------------------------------------------------------
- * Function: supports_big
+ * Function: supports_big
*
- * Purpose: Determines if the file system of the current working
- * directory supports big files.
+ * Purpose: Determines if the file system of the current working
+ * directory supports big files.
*
- * Return: Success: Non-zero if big files are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if big files are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 18, 2007
*
* Modifications:
@@ -254,17 +254,17 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: enough_room
+ * Function: enough_room
*
- * Purpose: Tries to create a bunch of sparse files to see if quotas will
- * get in the way. Some systems also have problems opening
- * enough files and we'll check that too.
+ * Purpose: Tries to create a bunch of sparse files to see if quotas will
+ * get in the way. Some systems also have problems opening
+ * enough files and we'll check that too.
*
- * Return: Success: Non-zero
+ * Return: Success: Non-zero
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 6, 1998
*
* Modifications:
@@ -277,7 +277,7 @@ error:
* 'name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
enough_room(hid_t fapl)
{
@@ -319,23 +319,23 @@ done:
return ret_value;
}
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
- * Function: writer
+ * Function: writer
*
- * Purpose: Creates a *big* dataset.
+ * Purpose: Creates a *big* dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
* Modifications:
- * Robb Matzke, 15 Jul 1998
- * Addresses are written to the file DNAME instead of stdout.
+ * Robb Matzke, 15 Jul 1998
+ * Addresses are written to the file DNAME instead of stdout.
*
*-------------------------------------------------------------------------
*/
@@ -429,7 +429,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
for (i = 0; i < wrt_n; i++) {
/* start position must be at least hs_size from the end */
hs_start[0] = randll(size2[0] - hs_size[0], i);
- HDfprintf(out, "#%03d 0x%016Hx\n", i, hs_start[0]);
+ HDfprintf(out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]);
if (H5Sselect_hyperslab(space2, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0)
goto error;
for (j = 0; j < WRT_SIZE; j++) {
@@ -475,15 +475,15 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: reader
+ * Function: reader
*
- * Purpose: Reads some data from random locations in the dataset.
+ * Purpose: Reads some data from random locations in the dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
@@ -524,7 +524,7 @@ reader(char *filename, hid_t fapl)
break;
i = (int)HDstrtol(ln + 1, &s, 10);
hs_offset[0] = HDstrtoull(s, NULL, 0);
- HDfprintf(stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], "");
+ HDfprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], "");
HDfflush(stdout);
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
@@ -583,13 +583,13 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: usage
+ * Function: usage
*
- * Purpose: Print command usage
+ * Purpose: Print command usage
*
- * Return: void
+ * Return: void
*
- * Programmer: Albert Chent
+ * Programmer: Albert Chent
* Mar 28, 2002
*
* Modifications:
@@ -605,7 +605,7 @@ usage(void)
"\t-c\tFile system Checking skipped. Caution: this test generates\n"
"\t\tmany big files and may fill up the file system.\n"
"\t-fsize\tChange family size default to <fsize> where <fsize> is\n"
- "\t\ta positive float point number. Default value is %Hu.\n"
+ "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n"
"Examples:\n"
"\tbig -fsize 2.1e9 \t# test with file size just under 2GB\n"
"\tbig -fsize 2.2e9 \t# test with file size just above 2GB\n"
@@ -747,22 +747,22 @@ error:
} /* end test_family() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
- * Albert Cheng, 2002/03/28
- * Added command option -fsize.
- * Albert Cheng, 2002/04/19
- * Added command option -c.
+ * Albert Cheng, 2002/03/28
+ * Added command option -fsize.
+ * Albert Cheng, 2002/04/19
+ * Added command option -c.
*
* Raymond Lu, 2007/05/25
* Added similar tests for SEC2 and STDIO drivers.
@@ -819,10 +819,10 @@ main(int ac, char **av)
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned long)1155438845; */
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)seed);
/* run VFD-specific test */
diff --git a/test/bittests.c b/test/bittests.c
index 4415600..5e83dfe 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, June 16, 1998
*
* Purpose: Tests functions in H5Tbit.c
diff --git a/test/btree2.c b/test/btree2.c
index fda9268..3e03366 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, February 1, 2005
*/
#include "h5test.h"
@@ -2961,10 +2961,10 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1109170019;
- HDfprintf(stderr, "curr_time=%lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time=1109170019;
+HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -4964,10 +4964,10 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1451342093;
- HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time = 1451342093;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -8670,10 +8670,10 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1163537969;
- HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time = 1163537969;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -8706,8 +8706,8 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
TEST_ERROR
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
if (single_file_vfd) {
/* Make a copy of the file in memory, in order to speed up deletion testing */
@@ -10089,14 +10089,14 @@ main(void)
if (nerrors)
goto error;
- puts("All v2 B-tree tests passed.");
+ HDputs("All v2 B-tree tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
diff --git a/test/cache.c b/test/cache.c
index 55d8904..31d6619 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -2770,21 +2770,25 @@ write_permitted_check(int
/*-------------------------------------------------------------------------
* Function: check_insert_entry()
*
- * Purpose: Verify that H5C_insert_entry behaves as expected.
- * Test the behaviour with different flags.
+ * Purpose: Verify that H5C_insert_entry behaves as expected.
+ * Test the behaviour with different flags.
*
- * This test was added primarily to test basic insert
- * pinned entry functionallity, but I through in explicit
- * tests for other functionallity that is tested implicitly
- * elsewhere.
+ * This test was added primarily to test basic insert
+ * pinned entry functionallity, but I through in explicit
+ * tests for other functionallity that is tested implicitly
+ * elsewhere.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 8/10/06
*
* Modifications:
*
+ * Updated tests to accommodate the case in which the
+ * slist is disabled.
+ * JRM -- 5/14/20
+ *
*-------------------------------------------------------------------------
*/
@@ -2982,7 +2986,8 @@ check_insert_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != 4 * entry_sizes[entry_type]) ||
- (cache_ptr->slist_len != 4) || (cache_ptr->slist_size != 4 * entry_sizes[entry_type]) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 4) || (cache_ptr->slist_size != 4 * entry_sizes[entry_type]))) ||
(cache_ptr->pl_len != 0) || (cache_ptr->pl_size != (size_t)0) || (cache_ptr->pel_len != 2) ||
(cache_ptr->pel_size != 2 * entry_sizes[entry_type]) || (cache_ptr->LRU_list_len != 2) ||
(cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type])
@@ -3007,10 +3012,11 @@ check_insert_entry(unsigned paged)
if ((cache_ptr->insertions[entry_type] != 4) || (cache_ptr->pinned_insertions[entry_type] != 2) ||
(cache_ptr->pins[entry_type] != 2) || (cache_ptr->unpins[entry_type] != 0) ||
(cache_ptr->dirty_pins[entry_type] != 0) || (cache_ptr->max_index_len != 4) ||
- (cache_ptr->max_index_size != 4 * entry_sizes[entry_type]) || (cache_ptr->max_slist_len != 4) ||
- (cache_ptr->max_slist_size != 4 * entry_sizes[entry_type]) || (cache_ptr->max_pl_len != 0) ||
- (cache_ptr->max_pl_size != (size_t)0) || (cache_ptr->max_pel_len != 2) ||
- (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) {
+ (cache_ptr->max_index_size != 4 * entry_sizes[entry_type]) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 4) || (cache_ptr->slist_size != 4 * entry_sizes[entry_type]))) ||
+ (cache_ptr->max_pl_len != 0) || (cache_ptr->max_pl_size != (size_t)0) ||
+ (cache_ptr->max_pel_len != 2) || (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) {
pass = FALSE;
failure_mssg = "Unexpected insert results 11.";
@@ -3137,18 +3143,25 @@ check_flush_cache(unsigned paged)
} /* check_flush_cache() */
/*-------------------------------------------------------------------------
+ *
* Function: check_flush_cache__empty_cache()
*
- * Purpose: Verify that flush_cache behaves as expected with an empty
+ * Purpose : Verify that flush_cache behaves as expected with an empty
* cache.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 1/12/05
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
+ *
*-------------------------------------------------------------------------
*/
@@ -3156,7 +3169,6 @@ static void
check_flush_cache__empty_cache(H5F_t *file_ptr)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
- herr_t result;
if (cache_ptr == NULL) {
@@ -3171,50 +3183,31 @@ check_flush_cache__empty_cache(H5F_t *file_ptr)
/* Test behaviour on an empty cache. Can't do much sanity
* checking in this case, so simply check the return values.
+ *
+ * Check of return values is done in the H5C_FLUSH_CACHE() macro.
*/
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
-
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "flush with flags = 0x00 failed on empty cache.\n";
- }
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "flush with flags = 0x00 failed on empty cache.\n")
}
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
-
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "flush with flags = 0x04 failed on empty cache.\n";
- }
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "flush with flags = 0x04 failed on empty cache.\n")
}
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG);
-
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "flush with flags = 0x08 failed on empty cache.\n";
- }
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG,
+ "flush with flags = 0x08 failed on empty cache.\n")
}
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG);
-
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "flush with flags = 0x10 failed on empty cache.\n";
- }
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG,
+ "flush with flags = 0x10 failed on empty cache.\n")
}
} /* check_flush_cache__empty_cache() */
@@ -4418,22 +4411,26 @@ check_flush_cache__multi_entry(H5F_t *file_ptr)
check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec);
}
- return;
-
} /* check_flush_cache__multi_entry() */
/*-------------------------------------------------------------------------
* Function: check_flush_cache__multi_entry_test()
*
- * Purpose: Run a multi entry flush cache test.
+ * Purpose : Run a multi entry flush cache test.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 1/13/05
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
+ *
*-------------------------------------------------------------------------
*/
@@ -4443,7 +4440,6 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
{
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
- herr_t result;
unsigned u;
size_t total_entry_size = 0;
test_entry_t *base_addr;
@@ -4453,7 +4449,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
/* This gets used a lot, so lets leave it in. */
HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n",
- test_num);
+ test_num);
#endif /* JRM */
if (cache_ptr == NULL) {
@@ -4478,6 +4474,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
u = 0;
while (pass && (u < spec_size)) {
+
if (((unsigned)spec[u].entry_num != u) || (spec[u].entry_type < 0) ||
(spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) || (spec[u].entry_index < 0) ||
(spec[u].entry_index > max_indices[spec[u].entry_type])) {
@@ -4492,6 +4489,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
u = 0;
while (pass && (u < spec_size)) {
+
if (spec[u].insert_flag) {
insert_entry(file_ptr, spec[u].entry_type, spec[u].entry_index, spec[u].flags);
@@ -4510,11 +4508,10 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (pass) {
- result = H5C_flush_cache(file_ptr, flush_flags);
+ H5C_FLUSH_CACHE(file_ptr, flush_flags, "dummy failure message.\n")
- if (result < 0) {
+ if (!pass) {
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
test_num);
failure_mssg = msg;
@@ -4568,9 +4565,9 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
/* clean up the cache to prep for the next test */
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "dummy mssg.\n")
- if (result < 0) {
+ if (!pass) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
@@ -4587,6 +4584,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
u = 0;
while (pass && (u < spec_size)) {
+
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
@@ -4597,22 +4595,27 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
u++;
}
- return;
-
} /* check_flush_cache__multi_entry_test() */
/*-------------------------------------------------------------------------
+ *
* Function: check_flush_cache__pe_multi_entry_test()
*
- * Purpose: Run a multi entry flush cache test.
+ * Purpose: Run a multi entry flush cache test.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/5/06
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/16/20
+ *
*-------------------------------------------------------------------------
*/
@@ -4622,7 +4625,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
{
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
- herr_t result;
unsigned u;
int j;
size_t total_entry_size = 0;
@@ -4658,6 +4660,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
u = 0;
while (pass && (u < spec_size)) {
+
if (((unsigned)spec[u].entry_num != u) || (spec[u].entry_type < 0) ||
(spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) || (spec[u].entry_index < 0) ||
(spec[u].entry_index > max_indices[spec[u].entry_type]) || (spec[u].num_pins < 0) ||
@@ -4687,6 +4690,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
total_entry_size += entry_sizes[spec[u].entry_type];
for (j = 0; j < spec[u].num_pins; j++) {
+
create_pinned_entry_dependency(file_ptr, spec[u].entry_type, spec[u].entry_index,
spec[u].pin_type[j], spec[u].pin_idx[j]);
}
@@ -4696,11 +4700,10 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (pass) {
- result = H5C_flush_cache(file_ptr, flush_flags);
+ H5C_FLUSH_CACHE(file_ptr, flush_flags, "dummy failure message.\n")
- if (result < 0) {
+ if (!pass) {
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
flush_flags, test_num);
failure_mssg = msg;
@@ -4709,6 +4712,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
u = 0;
while (pass && (u < spec_size)) {
+
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
@@ -4754,9 +4758,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
/* clean up the cache to prep for the next test */
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "dummy mssg.\n")
- if (result < 0) {
+ if (!pass) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
@@ -4773,6 +4777,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
u = 0;
while (pass && (u < spec_size)) {
+
base_addr = entries[spec[u].entry_type];
entry_ptr = &(base_addr[spec[u].entry_index]);
@@ -4783,8 +4788,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
u++;
}
- return;
-
} /* check_flush_cache__pe_multi_entry_test() */
/*-------------------------------------------------------------------------
@@ -7980,23 +7983,27 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* finally finish up with the flush ops eviction test */
check_flush_cache__flush_op_eviction_test(file_ptr);
- return;
-
} /* check_flush_cache__flush_ops() */
/*-------------------------------------------------------------------------
* Function: check_flush_cache__flush_op_test()
*
- * Purpose: Run a flush op flush cache test. Of the nature of
- * flush operations, this is a multi-entry test.
+ * Purpose: Run a flush op flush cache test. Of the nature of
+ * flush operations, this is a multi-entry test.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 9/3/06
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/16/20
+ *
*-------------------------------------------------------------------------
*/
@@ -8009,7 +8016,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
{
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
- herr_t result;
int i;
int j;
test_entry_t *base_addr;
@@ -8042,6 +8048,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < spec_size)) {
+
if ((spec[i].entry_num != i) || (spec[i].entry_type < 0) ||
(spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) || (spec[i].entry_index < 0) ||
(spec[i].entry_index > max_indices[spec[i].entry_type]) || (spec[i].num_pins < 0) ||
@@ -8057,6 +8064,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < check_size)) {
+
if ((check[i].entry_num != i) || (check[i].entry_type < 0) ||
(check[i].entry_type >= NUMBER_OF_ENTRY_TYPES) || (check[i].entry_index < 0) ||
(check[i].entry_index > max_indices[check[i].entry_type]) ||
@@ -8084,6 +8092,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < spec_size)) {
+
if (spec[i].insert_flag) {
insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, spec[i].flags);
@@ -8104,6 +8113,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
}
for (j = 0; j < spec[i].num_flush_ops; j++) {
+
add_flush_op(spec[i].entry_type, spec[i].entry_index, spec[i].flush_ops[j].op_code,
spec[i].flush_ops[j].type, spec[i].flush_ops[j].idx, spec[i].flush_ops[j].flag,
spec[i].flush_ops[j].size, spec[i].flush_ops[j].order_ptr);
@@ -8126,9 +8136,9 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (pass) {
- result = H5C_flush_cache(file_ptr, flush_flags);
+ H5C_FLUSH_CACHE(file_ptr, flush_flags, "dummy failure message")
- if (result < 0) {
+ if (!pass) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
@@ -8139,6 +8149,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < spec_size)) {
+
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
@@ -8172,6 +8183,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < check_size)) {
+
if (check[i].in_cache != entry_in_cache(cache_ptr, check[i].entry_type, check[i].entry_index)) {
pass = FALSE;
@@ -8199,74 +8211,104 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
#if 0 /* This is useful debugging code. Lets keep it around for a while. */
- if(entry_ptr->size != check[i].expected_size) {
- HDfprintf(stdout, "entry_ptr->size (expected) = %d (%d).\n",
- (int)(entry_ptr->size),
- (int)(check[i].expected_size));
- }
- if((!entry_ptr->header.destroy_in_progress) &&
- (check[i].in_cache) &&
- (entry_ptr->header.size != check[i].expected_size)) {
- HDfprintf(stdout,
+ if ( entry_ptr->size != check[i].expected_size ) {
+
+ HDfprintf(stdout, "entry_ptr->size (expected) = %d (%d).\n",
+ (int)(entry_ptr->size),
+ (int)(check[i].expected_size));
+ }
+
+ if ( ( ! entry_ptr->header.destroy_in_progress ) &&
+ ( check[i].in_cache ) &&
+ ( entry_ptr->header.size != check[i].expected_size ) ) {
+
+ HDfprintf(stdout,
"(!destroy in progress and in cache and size (expected) = %d (%d).\n",
(int)(entry_ptr->header.size),
- (int)(check[i].expected_size));
- }
- if(entry_ptr->at_main_addr != check[i].at_main_addr) {
- HDfprintf(stdout, "(%d,%d) at main addr (expected) = %d (%d).\n",
- (int)(check[i].entry_type),
- (int)(check[i].entry_index),
+ (int)(check[i].expected_size));
+ }
+
+ if ( entry_ptr->at_main_addr != check[i].at_main_addr ) {
+
+ HDfprintf(stdout,
+ "(%d,%d) at main addr (expected) = %d (%d).\n",
+ (int)(check[i].entry_type),
+ (int)(check[i].entry_index),
(int)(entry_ptr->at_main_addr),
- (int)(check[i].at_main_addr));
+ (int)(check[i].at_main_addr));
+ }
+
+ if ( entry_ptr->is_dirty != check[i].is_dirty ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->is_dirty (expected) = %d (%d).\n",
+ (int)(entry_ptr->is_dirty),
+ (int)(check[i].is_dirty));
+ }
+
+ if ( entry_ptr->header.is_dirty != check[i].is_dirty ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->header.is_dirty (expected) = %d (%d).\n",
+ (int)(entry_ptr->header.is_dirty),
+ (int)(check[i].is_dirty));
+ }
+
+ if ( entry_ptr->is_protected != check[i].is_protected ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->is_protected (expected) = %d (%d).\n",
+ (int)(entry_ptr->is_protected),
+ (int)(check[i].is_protected));
+ }
+
+ if ( entry_ptr->header.is_protected != check[i].is_protected ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->header.is_protected (expected) = %d (%d).\n",
+ (int)(entry_ptr->is_protected),
+ (int)(check[i].is_protected));
+ }
+
+ if ( entry_ptr->is_pinned != check[i].is_pinned ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->is_pinned (expected) = %d (%d).\n",
+ (int)(entry_ptr->is_pinned),
+ (int)(check[i].is_pinned));
+ }
+
+ if ( entry_ptr->header.is_pinned != check[i].is_pinned ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->header.is_pinned (expected) = %d (%d).\n",
+ (int)(entry_ptr->header.is_pinned),
+ (int)(check[i].is_pinned));
+ }
+
+ if ( entry_ptr->deserialized != check[i].expected_deserialized ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->deserialized (expected) = %d (%d).\n",
+ (int)(entry_ptr->deserialized),
+ (int)(check[i].expected_deserialized));
+ }
+
+ if ( entry_ptr->serialized != check[i].expected_serialized ) {
+
+ HDfprintf(stdout,
+ "entry_ptr->serialized (expected) = %d (%d).\n",
+ (int)(entry_ptr->serialized),
+ (int)(check[i].expected_serialized));
+ }
+
+ if ( entry_ptr->destroyed != check[i].expected_destroyed ) {
+
+ HDfprintf(stdout, \
+ "entry_ptr->destroyed (expected) = %d (%d).\n",
+ (int)(entry_ptr->destroyed),
+ (int)(check[i].expected_destroyed));
}
- if(entry_ptr->is_dirty != check[i].is_dirty) {
- HDfprintf(stdout, "entry_ptr->is_dirty (expected) = %d (%d).\n",
- (int)(entry_ptr->is_dirty),
- (int)(check[i].is_dirty));
- }
- if(entry_ptr->header.is_dirty != check[i].is_dirty) {
- HDfprintf(stdout, "entry_ptr->header.is_dirty (expected) = %d (%d).\n",
- (int)(entry_ptr->header.is_dirty),
- (int)(check[i].is_dirty));
- }
- if(entry_ptr->is_protected != check[i].is_protected) {
- HDfprintf(stdout, "entry_ptr->is_protected (expected) = %d (%d).\n",
- (int)(entry_ptr->is_protected),
- (int)(check[i].is_protected));
- }
- if(entry_ptr->header.is_protected != check[i].is_protected) {
- HDfprintf(stdout, "entry_ptr->header.is_protected (expected) = %d (%d).\n",
- (int)(entry_ptr->is_protected),
- (int)(check[i].is_protected));
- }
- if(entry_ptr->is_pinned != check[i].is_pinned) {
- HDfprintf(stdout, "entry_ptr->is_pinned (expected) = %d (%d).\n",
- (int)(entry_ptr->is_pinned),
- (int)(check[i].is_pinned));
- }
- if(entry_ptr->header.is_pinned != check[i].is_pinned) {
- HDfprintf(stdout, "entry_ptr->header.is_pinned (expected) = %d (%d).\n",
- (int)(entry_ptr->header.is_pinned),
- (int)(check[i].is_pinned));
- }
- if(entry_ptr->deserialized !=
- check[i].expected_deserialized) {
- HDfprintf(stdout,
- "entry_ptr->deserialized (expected) = %d (%d).\n",
- (int)(entry_ptr->deserialized),
- (int)(check[i].expected_deserialized));
- }
- if(entry_ptr->serialized != check[i].expected_serialized) {
- HDfprintf(stdout,
- "entry_ptr->serialized (expected) = %d (%d).\n",
- (int)(entry_ptr->serialized),
- (int)(check[i].expected_serialized));
- }
- if(entry_ptr->destroyed != check[i].expected_destroyed) {
- HDfprintf(stdout, "entry_ptr->destroyed (expected) = %d (%d).\n",
- (int)(entry_ptr->destroyed),
- (int)(check[i].expected_destroyed));
- }
#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i,
@@ -8295,11 +8337,10 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
/* clean up the cache to prep for the next test */
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "dummy mssg.")
- if (result < 0) {
+ if (!pass) {
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
failure_mssg = msg;
}
@@ -8315,6 +8356,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < spec_size)) {
+
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
@@ -8329,6 +8371,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i = 0;
while (pass && (i < check_size)) {
+
base_addr = entries[check[i].entry_type];
entry_ptr = &(base_addr[check[i].entry_index]);
@@ -8341,29 +8384,33 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
i++;
}
- return;
-
} /* check_flush_cache__flush_op_test() */
/*-------------------------------------------------------------------------
* Function: check_flush_cache__flush_op_eviction_test()
*
- * Purpose: Verify that flush operations work as expected when an
+ * Purpose: Verify that flush operations work as expected when an
* entry is evicted.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 10/3/06
*
* Modifications:
*
- * Updated test for minor changes in the behaviour
- * of H5C__flush_single_entry().
+ * Updated test for minor changes in the behaviour
+ * of H5C__flush_single_entry().
+ *
+ * JRM -- 2/16/15
*
- * JRM -- 2/16/15
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/16/20
*
*-------------------------------------------------------------------------
*/
@@ -8376,7 +8423,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
int num_variable_entries = 10;
int num_monster_entries = 31;
int num_large_entries = 0;
- herr_t result;
test_entry_t * entry_ptr;
test_entry_t * base_addr;
struct expected_entry_status expected[10 + 31 + 14] = {
@@ -10390,14 +10436,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
-
- if (result < 0) {
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush invalidate failed after flush op eviction test")
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed after flush op eviction test";
- }
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -10492,8 +10534,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
reset_entries();
}
- return;
-
} /* check_flush_cache__flush_op_eviction_test() */
/*-------------------------------------------------------------------------
@@ -12117,22 +12157,26 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
}
}
- return;
-
} /* check_flush_cache__single_entry() */
/*-------------------------------------------------------------------------
* Function: check_flush_cache__single_entry_test()
*
- * Purpose: Run a single entry flush cache test.
+ * Purpose: Run a single entry flush cache test.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 1/12/05
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
+ *
*-------------------------------------------------------------------------
*/
@@ -12144,7 +12188,6 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
{
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
- herr_t result;
test_entry_t *base_addr;
test_entry_t *entry_ptr = NULL;
@@ -12187,18 +12230,19 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (pass) {
- result = H5C_flush_cache(file_ptr, flush_flags);
+ H5C_FLUSH_CACHE(file_ptr, flush_flags, "dummy failure mssg.")
- if (result < 0) {
+ if (!pass) { /* construct and set actual failure message */
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.",
flush_flags, test_num);
+
failure_mssg = msg;
}
else if ((entry_ptr->deserialized != expected_deserialized) ||
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
+
#if 0 /* This is useful debugging code -- lets keep it for a while */
HDfprintf(stdout,
@@ -12230,11 +12274,10 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
/* clean up the cache to prep for the next test */
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "dummy failure mssg.")
- if (result < 0) {
+ if (!pass) { /* construct and set actual failure message */
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -12253,29 +12296,32 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
}
}
- return;
-
} /* check_flush_cache__single_entry_test() */
/*-------------------------------------------------------------------------
* Function: check_flush_cache__pinned_single_entry_test()
*
- * Purpose: Run a pinned single entry flush cache test.
+ * Purpose: Run a pinned single entry flush cache test.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 3/28/06
*
* Modifications:
*
- * JRM -- 5/17/06
- * Added the pop_mark_dirty_prot and pop_mark_dirty_pinned
- * flags and supporting code to allow us to test the
- * H5C_mark_entry_dirty() call. Use the
- * call to mark the entry dirty while the entry is protected
- * if pop_mark_dirty_prot is TRUE, and to mark the entry
- * dirty while it is pinned if pop_mark_dirty_pinned is TRUE.
+ * JRM -- 5/17/06
+ * Added the pop_mark_dirty_prot and pop_mark_dirty_pinned
+ * flags and supporting code to allow us to test the
+ * H5C_mark_entry_dirty() call. Use the
+ * call to mark the entry dirty while the entry is protected
+ * if pop_mark_dirty_prot is TRUE, and to mark the entry
+ * dirty while it is pinned if pop_mark_dirty_pinned is TRUE.
+ *
+ * JRM -- 5/14/20
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
*
*-------------------------------------------------------------------------
*/
@@ -12291,7 +12337,6 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t expected_deserialized = TRUE;
- herr_t result;
test_entry_t *base_addr;
test_entry_t *entry_ptr = NULL;
@@ -12345,11 +12390,10 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (pass) {
- result = H5C_flush_cache(file_ptr, flush_flags);
+ H5C_FLUSH_CACHE(file_ptr, flush_flags, "dummy failure message\n")
- if (result < 0) {
+ if (!pass) { /* construct and set the correct failure message */
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
flush_flags, test_num);
failure_mssg = msg;
@@ -12357,6 +12401,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
else if ((entry_ptr->deserialized != expected_deserialized) ||
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
+
#if 0 /* this is useful debugging code -- keep it around */
HDfprintf(stdout,
"desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n",
@@ -12403,11 +12448,10 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "dummy mssg\n")
- if (result < 0) {
+ if (!pass) {
- pass = FALSE;
HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.",
test_num);
failure_mssg = msg;
@@ -12427,8 +12471,6 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
}
}
- return;
-
} /* check_flush_cache__pinned_single_entry_test() */
/*-------------------------------------------------------------------------
@@ -13411,7 +13453,7 @@ check_move_entry(unsigned paged)
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else
H5_FAILED()
@@ -13577,8 +13619,6 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
/* put the entry back where it started from */
move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, TRUE);
- return;
-
} /* check_move_entry__run_test() */
/*-------------------------------------------------------------------------
@@ -13686,14 +13726,20 @@ check_pin_protected_entry(unsigned paged)
/*-------------------------------------------------------------------------
* Function: check_resize_entry()
*
- * Purpose: Verify that H5C_resize_entry() and H5C_unprotect() resize
- * entries as expected.
+ * Purpose: Verify that H5C_resize_entry() and H5C_unprotect() resize
+ * entries as expected.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 7/7/06
*
+ * Modifications:
+ *
+ * Updated function to allow for disabling of the slist.
+ *
+ * JRM -- 5/18/20
+ *
*-------------------------------------------------------------------------
*/
@@ -13858,7 +13904,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != (LARGE_ENTRY_SIZE / 2)) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
@@ -13932,7 +13979,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
@@ -13988,7 +14036,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != (LARGE_ENTRY_SIZE / 4)) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
@@ -14037,7 +14086,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 1) || (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
@@ -14105,8 +14155,8 @@ check_resize_entry(unsigned paged)
if (pass) {
- if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
- (cache_ptr->slist_size != 0)) {
+ if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
@@ -14118,13 +14168,14 @@ check_resize_entry(unsigned paged)
if (pass) {
- if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
- (cache_ptr->slist_size != 0)) {
+ if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
+
base_addr = entries[LARGE_ENTRY_TYPE];
entry_ptr = &(base_addr[3]);
entry_size = LARGE_ENTRY_SIZE;
@@ -14145,7 +14196,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 3) || (cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
@@ -14161,7 +14213,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
@@ -14230,8 +14283,9 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 4) ||
(cache_ptr->index_size != ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 2))) ||
- (cache_ptr->slist_len != 2) ||
- (cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
@@ -14305,7 +14359,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 12.");
@@ -14362,8 +14417,9 @@ check_resize_entry(unsigned paged)
if ((cache_ptr->index_len != 4) ||
(cache_ptr->index_size != ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 4))) ||
- (cache_ptr->slist_len != 2) ||
- (cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 13.");
@@ -14412,7 +14468,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != (4 * LARGE_ENTRY_SIZE)) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 14.");
@@ -14481,7 +14538,8 @@ check_resize_entry(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 3) || (cache_ptr->index_size != (3 * LARGE_ENTRY_SIZE)) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 15.");
@@ -14503,8 +14561,8 @@ check_resize_entry(unsigned paged)
if (pass) {
- if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
- (cache_ptr->slist_size != 0)) {
+ if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 16.");
@@ -14536,16 +14594,19 @@ check_resize_entry(unsigned paged)
/*-------------------------------------------------------------------------
* Function: check_evictions_enabled()
*
- * Purpose: Verify that H5C_get_evictions_enabled() and
- * H5C_set_evictions_enabled() functions perform as expected.
+ * Purpose: Verify that H5C_get_evictions_enabled() and
+ * H5C_set_evictions_enabled() functions perform as expected.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 8/2/07
*
* Modifications:
*
+ * Updated function to allow for disabling of the slist.
+ *
+ * JRM -- 5/18/20
*
*-------------------------------------------------------------------------
*/
@@ -14635,8 +14696,9 @@ check_evictions_enabled(unsigned paged)
/* verify that it is empty */
if (pass) {
- if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
- (cache_ptr->slist_size != 0) || (cache_ptr->evictions_enabled != TRUE)) {
+ if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
@@ -14679,7 +14741,7 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -14705,7 +14767,7 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0) ||
+ ((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -14760,7 +14822,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -14822,7 +14885,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
@@ -14848,7 +14912,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
@@ -14873,7 +14938,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
@@ -14915,7 +14981,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 18) || (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -14944,7 +15011,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -15048,7 +15116,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 17) || (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
@@ -15089,7 +15158,8 @@ check_evictions_enabled(unsigned paged)
if (pass) {
if ((cache_ptr->index_len != 16) || (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
- (cache_ptr->slist_len != 3) || (cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->slist_len != 3) || (cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE))) ||
(cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -15174,23 +15244,29 @@ check_evictions_enabled(unsigned paged)
/*-------------------------------------------------------------------------
* Function: check_flush_protected_err()
*
- * Purpose: Verify that an attempt to flush the cache when it contains
- * a protected entry will generate an error.
+ * Purpose: Verify that an attempt to flush the cache when it contains
+ * a protected entry will generate an error.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 6/24/04
*
* Modifications:
*
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache().
+ *
+ * JRM -- 5/14/20
+ *
*-------------------------------------------------------------------------
*/
static unsigned
check_flush_protected_err(unsigned paged)
{
- H5F_t *file_ptr = NULL;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
if (paged)
TESTING("flush cache with protected entry error (paged aggregation)")
@@ -15210,27 +15286,41 @@ check_flush_protected_err(unsigned paged)
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
+ if (pass) {
+
+ cache_ptr = file_ptr->shared->cache;
+ }
+
protect_entry(file_ptr, 0, 0);
- if (H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) >= 0) {
+ /* enable slist prior to flush */
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, TRUE, FALSE) < 0)) {
+
+ pass = FALSE;
+ failure_mssg = "unable to enable slist prior to flush.\n";
+ }
+
+ if ((pass) && (H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) >= 0)) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
}
- else {
- unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
+ /* disable the slist after the flush */
+ if ((pass) && (H5C_set_slist_enabled(cache_ptr, FALSE, FALSE) < 0)) {
- if (H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) < 0) {
+ pass = FALSE;
+ failure_mssg = "unable to disable slist after flush.\n";
+ }
- pass = FALSE;
- failure_mssg = "flush failed after unprotect.\n";
- }
- else {
+ unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- takedown_cache(file_ptr, FALSE, FALSE);
- }
+ if (pass) {
+
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "flush failed after unprotect.\n")
}
+
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if (pass) {
@@ -16279,7 +16369,7 @@ check_move_entry_errs(unsigned paged)
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else {
H5_FAILED()
@@ -16292,12 +16382,12 @@ check_move_entry_errs(unsigned paged)
/*-------------------------------------------------------------------------
* Function: check_resize_entry_errs()
*
- * Purpose: Verify that invalid calls to H5C_resize_entry()
- * generates errors as expected.
+ * Purpose: Verify that invalid calls to H5C_resize_entry()
+ * generates errors as expected.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 7/7/06
*
*-------------------------------------------------------------------------
@@ -19012,7 +19102,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged)
/* NOTE: upper_hr_threshold MUST be type double (not float)
* or the cache test will fail on 64-bit systems.
*/
- auto_size_ctl.upper_hr_threshold = H5_DOUBLE(0.999); /* for ease of testing */
+ auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */
auto_size_ctl.decrement = 0.5f;
@@ -26392,7 +26482,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 1.\n";
@@ -26423,7 +26513,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
@@ -26464,7 +26554,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5f)) { /* i.e. hit_rate != 0.5 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
@@ -26537,7 +26627,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5F)) { /* i.e. hit_rate != 0.5 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
@@ -26768,7 +26858,6 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
* Return: void
*
* Programmer: Mike McGreevy
- * <mamcgree@hdfgroup.org>
* 12/16/08
*
* Modifications:
@@ -26796,2711 +26885,163 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Set up the expected array. This is used to maintain a table of the
* expected status of every entry used in this test.
*/
- struct expected_entry_status expected[150] = {
- /* entry entry in at main flush
- dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {HUGE_ENTRY_TYPE,
- 0,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 1,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 2,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 3,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 4,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 5,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 6,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 7,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 8,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 9,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 10,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 11,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 12,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 13,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 14,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 15,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 16,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 17,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 18,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 19,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 20,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 21,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 22,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 23,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 24,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 25,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 26,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 27,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 28,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 29,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 30,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 31,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 32,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 33,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 34,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 35,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 36,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 37,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 38,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 39,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 40,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 41,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 42,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 43,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 44,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 45,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 46,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 47,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 48,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 49,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 50,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 51,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 52,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 53,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 54,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 55,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 56,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 57,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 58,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 59,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 60,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 61,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 62,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 63,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 64,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 65,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 66,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 67,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 68,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 69,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 70,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 71,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 72,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 73,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 74,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 75,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 76,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 77,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 78,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 79,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 80,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 81,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 82,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 83,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 84,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 85,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 86,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 87,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 88,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 89,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 90,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 91,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 92,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 93,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 94,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 95,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 96,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 97,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 98,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 99,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 100,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 101,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 102,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 103,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 104,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 105,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 106,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 107,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 108,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 109,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 110,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 111,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 112,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 113,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 114,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 115,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 116,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 117,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 118,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 119,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 120,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 121,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 122,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 123,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 124,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 125,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 126,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 127,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 128,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 129,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 130,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 131,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 132,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 133,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 134,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 135,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 136,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 137,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 138,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 139,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 140,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 141,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 142,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 143,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 144,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 145,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 146,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 147,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 148,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 149,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+ /* clang-format off */
+ struct expected_entry_status expected[150] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ };
+ /* clang-format on */
pass = TRUE;
@@ -29734,7 +27275,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Fill out the rest of the cache with entries */
/* Verify expected status of entries after each insertion */
- for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) {
+ for (; entry_idx < 50; entry_idx++) {
if (fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
@@ -29868,7 +27409,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
* After each insertion, verify the expected status of the
* entries in the cache.
*/
- for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) {
+ for (; entry_idx < 100; entry_idx++) {
if (fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
@@ -30175,101 +27716,19 @@ check_flush_deps(unsigned paged)
test_entry_t *base_addr; /* Base address of entries for test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
unsigned u; /* Local index variable */
- struct expected_entry_status expected[5] = {
- /* entry entry in at main flush dep flush dep child flush flush flush
- */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {PICO_ENTRY_TYPE,
- 0,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 1,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 2,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 3,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 4,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+
+ /* clang-format off */
+ struct expected_entry_status expected[5] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ };
+ /* clang-format on */
if (paged)
TESTING("flush dependencies (paged aggregation)")
@@ -32150,7 +29609,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -32416,7 +29875,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -32428,13 +29887,21 @@ done:
/*-------------------------------------------------------------------------
* Function: check_flush_deps_order()
*
- * Purpose: Verify that the order that entries with flush dependencies
+ * Purpose: Verify that the order that entries with flush dependencies
* is correct
*
- * Return: 0 on success, non-zero on failure
+ * Return: 0 on success, non-zero on failure
*
- * Programmer: Quincey Koziol
- * 3/17/09
+ * Programmer: Quincey Koziol
+ * 3/17/09
+ *
+ * Modifications:
+ *
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -32446,102 +29913,19 @@ check_flush_deps_order(unsigned paged)
H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
unsigned u; /* Local index variable */
- struct expected_entry_status expected[5] = {
- /* entry entry in at main flush dep flush dep child flush flush flush
- */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {PICO_ENTRY_TYPE,
- 0,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 1,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 2,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 3,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {PICO_ENTRY_TYPE,
- 4,
- PICO_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
- unsigned flush_order; /* Index for tracking flush order */
+ unsigned flush_order; /* Index for tracking flush order */
+ /* clang-format off */
+ struct expected_entry_status expected[5] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ };
+ /* clang-format on */
if (paged)
TESTING("flush dependencies flush order (paged aggregation)")
@@ -32616,8 +30000,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -32631,8 +30013,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32717,8 +30099,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -32744,8 +30124,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32832,8 +30212,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -32863,8 +30241,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32959,8 +30337,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -32990,8 +30366,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33131,8 +30507,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -33180,8 +30554,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33358,8 +30732,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -33407,8 +30779,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33534,8 +30906,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -33573,8 +30943,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33672,8 +31042,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -33711,8 +31079,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33864,8 +31232,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -33916,8 +31282,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -34119,8 +31485,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -34172,8 +31536,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -34395,8 +31759,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -34448,8 +31810,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -34710,8 +32072,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -34759,8 +32119,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -35054,8 +32414,6 @@ check_flush_deps_order(unsigned paged)
/* Flush the cache and verify that the entries were flushed in correct order */
{
- herr_t result; /* Generic return value */
-
add_flush_op(entry_type, 0, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 1, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
add_flush_op(entry_type, 2, FLUSH_OP__ORDER, entry_type, 0, FALSE, (size_t)0, &flush_order);
@@ -35103,8 +32461,8 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
- if (result < 0)
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "dummy mssg")
+ if (!pass)
CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -35255,7 +32613,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -35285,102 +32643,19 @@ check_notify_cb(unsigned paged)
test_entry_t *base_addr; /* Base address of entries for test */
test_entry_t *entry_ptr; /* Cache entry to examine/manipulate */
int entry_type = NOTIFY_ENTRY_TYPE; /* Use entry w/notify callback (size of entries doesn't matter) */
- unsigned u; /* Local index variable */
- struct expected_entry_status expected[5] = {
- /* entry entry in at main flush
- dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {NOTIFY_ENTRY_TYPE,
- 0,
- NOTIFY_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {NOTIFY_ENTRY_TYPE,
- 1,
- NOTIFY_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {NOTIFY_ENTRY_TYPE,
- 2,
- NOTIFY_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {NOTIFY_ENTRY_TYPE,
- 3,
- NOTIFY_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {NOTIFY_ENTRY_TYPE,
- 4,
- NOTIFY_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+ unsigned u; /* Local index variable */
+ /* clang-format off */
+ struct expected_entry_status expected[5] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { NOTIFY_ENTRY_TYPE, 0, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { NOTIFY_ENTRY_TYPE, 1, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { NOTIFY_ENTRY_TYPE, 2, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ };
+ /* clang-format on */
if (paged)
TESTING("'notify' callback (paged)")
@@ -35554,7 +32829,7 @@ done:
takedown_cache(file_ptr, FALSE, FALSE);
if (pass)
- PASSED()
+ PASSED();
else {
H5_FAILED();
HDfprintf(stdout, "%s.\n", failure_mssg);
@@ -35598,2711 +32873,163 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Set up the expected array. This is used to maintain a table of the
* expected status of every entry used in this test.
*/
- struct expected_entry_status expected[150] = {
- /* entry entry in at main flush
- dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {HUGE_ENTRY_TYPE,
- 0,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 1,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 2,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 3,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 4,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 5,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 6,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 7,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 8,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 9,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 10,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 11,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 12,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 13,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 14,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 15,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 16,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 17,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 18,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 19,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 20,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 21,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 22,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 23,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 24,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 25,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 26,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 27,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 28,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 29,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 30,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 31,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 32,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 33,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 34,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 35,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 36,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 37,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 38,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 39,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 40,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 41,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 42,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 43,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 44,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 45,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 46,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 47,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 48,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 49,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 50,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 51,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 52,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 53,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 54,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 55,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 56,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 57,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 58,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 59,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 60,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 61,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 62,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 63,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 64,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 65,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 66,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 67,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 68,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 69,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 70,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 71,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 72,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 73,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 74,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 75,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 76,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 77,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 78,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 79,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 80,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 81,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 82,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 83,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 84,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 85,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 86,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 87,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 88,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 89,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 90,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 91,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 92,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 93,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 94,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 95,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 96,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 97,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 98,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 99,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 100,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 101,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 102,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 103,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 104,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 105,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 106,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 107,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 108,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 109,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 110,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 111,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 112,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 113,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 114,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 115,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 116,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 117,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 118,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 119,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 120,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 121,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 122,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 123,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 124,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 125,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 126,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 127,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 128,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 129,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 130,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 131,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 132,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 133,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 134,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 135,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 136,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 137,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 138,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 139,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 140,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 141,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 142,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 143,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 144,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 145,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 146,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 147,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 148,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 149,
- HUGE_ENTRY_SIZE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+ /* clang-format off */
+ struct expected_entry_status expected[150] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
+ } ;
+ /* clang-format on */
pass = TRUE;
@@ -38494,7 +33221,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Fill out the rest of the cache with entries */
/* Verify expected status of entries after each insertion */
- for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) {
+ for (; entry_idx < 50; entry_idx++) {
if (fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
@@ -38555,7 +33282,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
if (pass) {
/* Insert 50 more entries (indices 50-99) into the cache. */
- for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) {
+ for (; entry_idx < 100; entry_idx++) {
if (fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
@@ -38923,30 +33650,35 @@ check_entry_deletions_during_scans(unsigned paged)
} /* check_entry_deletions_during_scans() */
/*-------------------------------------------------------------------------
+ *
* Function: cedds__expunge_dirty_entry_in_flush_test()
*
- * Purpose: Verify that H5C_flush_cache() can handle the removal of
- * a dirty entry from the cache during its scan of the
- * skip list.
+ * Purpose: Verify that H5C_flush_cache() can handle the removal of
+ * a dirty entry from the cache during its scan of the
+ * skip list.
*
- * Do this by setting up a full cache, with the last entry
- * on the LRU being both dirty and having a flush operation
- * that deletes the second to last entry on the LRU. Then
- * flush the cache, triggering the flush of the last
- * item, and thereby the deletion of the second to last item.
+ * Do this by setting up a full cache, with the last entry
+ * on the LRU being both dirty and having a flush operation
+ * that deletes the second to last entry on the LRU. Then
+ * flush the cache, triggering the flush of the last
+ * item, and thereby the deletion of the second to last item.
*
- * H5C_flush_cache() should handle this deletion gracefully.
+ * H5C_flush_cache() should handle this deletion gracefully.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/4/15
*
* Modifications:
*
- * None.
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -38954,92 +33686,24 @@ check_entry_deletions_during_scans(unsigned paged)
static void
cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- herr_t result;
- struct expected_entry_status expected[36] = {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush
- flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked:
- */
- {HUGE_ENTRY_TYPE,
- 0,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 1,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 2,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 3,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+ int i;
+ /* clang-format off */
+ struct expected_entry_status expected[36] =
+ {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}
+ };
+ /* clang-format on */
if (pass) {
@@ -39122,15 +33786,15 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
* are in cache with the following characteristics:
*
* in
- * entry: cache? size: dirty? pinned? pins: flush operations:
+ * entry: cache? size: dirty? pinned? pins: flush operations:
*
- * (HET, 0) Y 16 KB Y N - expunge (HET 1)
+ * (HET, 0) Y 16 KB Y N - expunge (HET 1)
*
- * (HET, 1) Y 16 KB Y N - -
+ * (HET, 1) Y 16 KB Y N - -
*
- * (HET, 2) Y 16 KB Y N - -
+ * (HET, 2) Y 16 KB Y N - -
*
- * (HET, 3) Y 16 KB Y N - -
+ * (HET, 3) Y 16 KB Y N - -
*
* Recall that in this test bed, flush operations are excuted the
* first time the associated entry is flushed, and are then
@@ -39145,14 +33809,10 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush inval failed in cedds expunge dirty entry in flush test")
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed in cedds expunge dirty entry in flush test";
- }
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cedds expunge dirty entry in flush test";
@@ -39198,37 +33858,39 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* cedds__expunge_dirty_entry_in_flush_test() */
/*-------------------------------------------------------------------------
* Function: cedds__H5C_make_space_in_cache()
*
- * Purpose: Verify that H5C__make_space_in_cache() can handle the
- * removal from the cache of the next item in its reverse scan
- * of the LRU list.
+ * Purpose: Verify that H5C__make_space_in_cache() can handle the
+ * removal from the cache of the next item in its reverse scan
+ * of the LRU list.
*
- * Do this by setting up a full cache, with the last entry
- * on the LRU being both dirty and having a flush operation
- * that deleted the second to last entry on the LRU. Then
- * load an additional entry, triggering the flush of the last
- * item, and thereby the deletion of the second to last item.
+ * Do this by setting up a full cache, with the last entry
+ * on the LRU being both dirty and having a flush operation
+ * that deleted the second to last entry on the LRU. Then
+ * load an additional entry, triggering the flush of the last
+ * item, and thereby the deletion of the second to last item.
*
- * H5C__make_space_in_cache() should detect this deletion, and
- * restart its scan of the LRU from the tail, instead of
- * examining the now deleted next item up on the LRU.
+ * H5C__make_space_in_cache() should detect this deletion, and
+ * restart its scan of the LRU from the tail, instead of
+ * examining the now deleted next item up on the LRU.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/4/15
*
* Modifications:
*
- * None.
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -39236,670 +33898,58 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
static void
cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- const int num_huge_entries = 4;
- const int num_monster_entries = 32;
- herr_t result;
- struct expected_entry_status expected[36] = {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush
- flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {HUGE_ENTRY_TYPE,
- 0,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 1,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 2,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {HUGE_ENTRY_TYPE,
- 3,
- HUGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 0,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 1,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 2,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 3,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 4,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 5,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 6,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 7,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 8,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 9,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 10,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 11,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 12,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 13,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 14,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 15,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 16,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 17,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 18,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 19,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 20,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 21,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 22,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 23,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 24,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 25,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 26,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 27,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 28,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 29,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 30,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 31,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+ const int num_huge_entries = 4;
+ const int num_monster_entries = 32;
+ /* clang-format off */
+ struct expected_entry_status expected[36] =
+ {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
};
+ /* clang-format on */
if (pass) {
@@ -40090,14 +34140,10 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush invalidate failed after flush op eviction test")
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed after flush op eviction test";
- }
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -40170,37 +34216,39 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* cedds__H5C_make_space_in_cache() */
/*-------------------------------------------------------------------------
* Function: cedds__H5C__autoadjust__ageout__evict_aged_out_entries()
*
- * Purpose: Verify that H5C__autoadjust__ageout__evict_aged_out_entries()
- * can handle the removal from the cache of the next item in
- * its reverse scan of the LRU list.
+ * Purpose: Verify that H5C__autoadjust__ageout__evict_aged_out_entries()
+ * can handle the removal from the cache of the next item in
+ * its reverse scan of the LRU list.
*
- * Do this by setting up a full cache, with the last entry
- * on the LRU being both dirty and having a flush operation
- * that deletes the second to last entry on the LRU. Then
- * access the first item in the LRU repeatedly until the
- * item, and thereby the deletion of the second to last item.
+ * Do this by setting up a full cache, with the last entry
+ * on the LRU being both dirty and having a flush operation
+ * that deletes the second to last entry on the LRU. Then
+ * access the first item in the LRU repeatedly until the
+ * item, and thereby the deletion of the second to last item.
*
- * H5C__make_space_in_cache() should detect this deletion, and
- * restart its scan of the LRU from the tail, instead of
- * examining the now deleted next item up on the LRU.
+ * H5C__make_space_in_cache() should detect this deletion, and
+ * restart its scan of the LRU from the tail, instead of
+ * examining the now deleted next item up on the LRU.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/4/15
*
* Modifications:
*
- * None.
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -40208,596 +34256,53 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
static void
cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- herr_t result;
- struct expected_entry_status expected[36] = {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush
- flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {MONSTER_ENTRY_TYPE,
- 0,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 1,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 2,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 3,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 4,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 5,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 6,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 7,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 8,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 9,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 10,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 11,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 12,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 13,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 14,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 15,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 16,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 17,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 18,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 19,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 20,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 21,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 22,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 23,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 24,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 25,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 26,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 27,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 28,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 29,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 30,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 31,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, -1, -1, -1, -1, -1, -1, -1},
- {-1, -1, -1, -1, -1, -1, -1, -1},
- 0,
- 0,
- 0,
- -1,
- FALSE},
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+ int i;
+ herr_t result;
+ /* clang-format off */
+ struct expected_entry_status expected[36] =
+ {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
};
+ /* clang-format on */
H5C_auto_size_ctl_t saved_auto_size_ctl;
H5C_auto_size_ctl_t test_auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
@@ -41051,14 +34556,10 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush invalidate failed after flush op eviction test")
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed after flush op eviction test";
- }
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -41111,98 +34612,100 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */
/*-------------------------------------------------------------------------
* Function: cedds__H5C_flush_invalidate_cache__bucket_scan()
*
- * Purpose: Note: We now use the index list when we scan the
- * contents of the metadata cache, so in principal,
- * this test is obsolete. However, even using the
- * index list, restarts are possible, and must be
- * handled gracefully.
- *
- * As it turns out, this test triggers index list
- * scan restarts, and thus with minor changes is
- * still a useful test.
- *
- * For this reason, with the exception of changing
- * to check the index_scan_restart stat instead of
- * hash bucket restarts, I'm leaving the test
- * alone. If and when it starts to fail due to
- * other changes, we can re-work it to test
- * index list scan restarts explicitly.
- *
- * JRM -- 11/2/16
- *
- * Verify that H5C_flush_invalidate_cache() can handle
- * the removal from the cache of the next item in
- * its scans of hash buckets.
- *
- * !!!!!!!!!!WARNING !!!!!!!!!!
- *
- * This test may fail to function correctly if the hash
- * table size or hash function is altered.
- *
- * To setup the test, this function depends on the fact that
- * H5C_flush_invalidate_cache() does alternating scans of the
- * slist and the index. If this changes, the test will likely
- * also cease to function correctly.
- *
- * The test relies on a known hash function and hash table
- * size to select a set of test entries that will all hash
- * to the same hash bucket -- call it the test hash bucket.
- * It also relies on known behavior of the cache to place
- * the entries in the test bucket in a known order.
- *
- * To avoid pre-mature flushes of the entries in the
- * test hash bucket, all entries are initially clean,
- * with the exception of the first entry which is dirty.
- * It avoids premature flushing by being the parent in
- * a flush dependency. The first entry in the test bucket
- * also has a flush op which expunges the second entry --
- * setting up the failure.
- *
- * An additional dirty entry is added (which must hash
- * to a different bucket, and must have a higher address
- * than at least the first entry in the test hash bucket.
- * This entry is the child in a flush dependency with the
- * first entry in the above hash bucket, and contains
- * a flush op to destroy this flush dependency.
- *
- * Since the first entry in the test hash bucket has a lower
- * address that the other dirty entry, the scan of the
- * slist encounters it first, and passes over it because
- * it has a flush dependency height of 1.
- *
- * The scan then encounters the second dirty entry and flushes
- * it -- causing it to destroy the flush dependency and thus
- * reducing the flush dependency height of the first entry in
- * the test hash bucket to zero.
- *
- * After completing a scan of the slist,
- * H5C_flush_invalidate_cache() then scans the index,
- * flushing all entries of flush dependency height zero.
- *
- * This sets up the potential error when the first entry
- * in the test hash bucket is flushed -- expunging the
- * second entry as a side effect. If
- * H5C_flush_invalidate_cache() fails to detect this,
- * it will attempt to continue its scan of the bucket with
- * an entry that has been deleted from the cache.
+ * Purpose: Note: We now use the index list when we scan the
+ * contents of the metadata cache, so in principal,
+ * this test is obsolete. However, even using the
+ * index list, restarts are possible, and must be
+ * handled gracefully.
+ *
+ * As it turns out, this test triggers index list
+ * scan restarts, and thus with minor changes is
+ * still a useful test.
+ *
+ * For this reason, with the exception of changing
+ * to check the index_scan_restart stat instead of
+ * hash bucket restarts, I'm leaving the test
+ * alone. If and when it starts to fail due to
+ * other changes, we can re-work it to test
+ * index list scan restarts explicitly.
+ *
+ * JRM -- 11/2/16
+ *
+ * Verify that H5C_flush_invalidate_cache() can handle
+ * the removal from the cache of the next item in
+ * its scans of hash buckets.
+ *
+ * !!!!!!!!!!WARNING !!!!!!!!!!
+ *
+ * This test may fail to function correctly if the hash
+ * table size or hash function is altered.
+ *
+ * To setup the test, this function depends on the fact that
+ * H5C_flush_invalidate_cache() does alternating scans of the
+ * slist and the index. If this changes, the test will likely
+ * also cease to function correctly.
+ *
+ * The test relies on a known hash function and hash table
+ * size to select a set of test entries that will all hash
+ * to the same hash bucket -- call it the test hash bucket.
+ * It also relies on known behavior of the cache to place
+ * the entries in the test bucket in a known order.
+ *
+ * To avoid pre-mature flushes of the entries in the
+ * test hash bucket, all entries are initially clean,
+ * with the exception of the first entry which is dirty.
+ * It avoids premature flushing by being the parent in
+ * a flush dependency. The first entry in the test bucket
+ * also has a flush op which expunges the second entry --
+ * setting up the failure.
+ *
+ * An additional dirty entry is added (which must hash
+ * to a different bucket, and must have a higher address
+ * than at least the first entry in the test hash bucket.
+ * This entry is the child in a flush dependency with the
+ * first entry in the above hash bucket, and contains
+ * a flush op to destroy this flush dependency.
+ *
+ * Since the first entry in the test hash bucket has a lower
+ * address that the other dirty entry, the scan of the
+ * slist encounters it first, and passes over it because
+ * it has a flush dependency height of 1.
+ *
+ * The scan then encounters the second dirty entry and flushes
+ * it -- causing it to destroy the flush dependency and thus
+ * reducing the flush dependency height of the first entry in
+ * the test hash bucket to zero.
+ *
+ * After completing a scan of the slist,
+ * H5C_flush_invalidate_cache() then scans the index,
+ * flushing all entries of flush dependency height zero.
+ *
+ * This sets up the potential error when the first entry
+ * in the test hash bucket is flushed -- expunging the
+ * second entry as a side effect. If
+ * H5C_flush_invalidate_cache() fails to detect this,
+ * it will attempt to continue its scan of the bucket with
+ * an entry that has been deleted from the cache.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/9/15
*
* Modifications:
*
- * None.
+ * Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -41210,116 +34713,30 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
static void
cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- int expected_hash_bucket = 0;
- herr_t result;
- haddr_t entry_addr;
- test_entry_t * entry_ptr;
- test_entry_t * base_addr = NULL;
- struct H5C_cache_entry_t * scan_ptr;
- struct expected_entry_status expected[5] = {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush
- flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked:
- */
- {MONSTER_ENTRY_TYPE,
- 0,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- {-1, 0, 0, 0, 0, 0, 0, 0},
- {-1, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 1,
- 1,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 8,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, 0, 0, 0, 0, 0, 0, 0},
- {-1, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 16,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, 0, 0, 0, 0, 0, 0, 0},
- {-1, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 24,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {-1, 0, 0, 0, 0, 0, 0, 0},
- {-1, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 31,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {MONSTER_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 1,
- 0,
- 0,
- -1,
- FALSE},
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+ int expected_hash_bucket = 0;
+ haddr_t entry_addr;
+ test_entry_t * entry_ptr;
+ test_entry_t * base_addr = NULL;
+ struct H5C_cache_entry_t *scan_ptr;
+ /* clang-format off */
+ struct expected_entry_status expected[5] =
+ {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 1, 1, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
+ { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE},
};
+ /* clang-format on */
if (pass) {
@@ -41512,14 +34929,10 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
-
- if (result < 0) {
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush invalidate failed after flush op eviction test")
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed after flush op eviction test";
- }
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -41575,8 +34988,6 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* cedds__H5C_flush_invalidate_cache__bucket_scan() */
/*-------------------------------------------------------------------------
@@ -41660,26 +35071,34 @@ check_stats(unsigned paged)
/*-------------------------------------------------------------------------
* Function: check_stats__smoke_check_1()
*
- * Purpose: Test to see if the statistics collection code is working
- * more or less as expected. Do this by performing a number
- * of operations in the cache, and checking to verify that
- * they result in the expected statistics.
+ * Purpose: Test to see if the statistics collection code is working
+ * more or less as expected. Do this by performing a number
+ * of operations in the cache, and checking to verify that
+ * they result in the expected statistics.
*
- * Note that this function is not intended to be a full test
- * of the statistics collection facility -- only a cursory
- * check that will serve as a place holder until more complete
- * tests are implemented.
+ * Note that this function is not intended to be a full test
+ * of the statistics collection facility -- only a cursory
+ * check that will serve as a place holder until more complete
+ * tests are implemented.
*
* Do nothing if pass is FALSE on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/22/15
*
* Modifications:
*
- * None.
+ * Modified slist stats checks to allow for the case that
+ * the slist is disabled.
+ *
+ * Also added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via the
+ * H5C_FLUSH_CACHE macro.
+ *
+ * JRM -- 5/14/20
+ *
*
*-------------------------------------------------------------------------
*/
@@ -41689,7 +35108,6 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
int i;
- herr_t result;
if (pass) {
if (cache_ptr == NULL) {
@@ -41749,13 +35167,15 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(1).";
} /* end if */
- if (pass)
+ if (pass) {
+
if ((cache_ptr->total_ht_insertions != 32) || (cache_ptr->total_ht_deletions != 0) ||
(cache_ptr->successful_ht_searches != 0) || (cache_ptr->total_successful_ht_search_depth != 0) ||
(cache_ptr->failed_ht_searches != 32) || (cache_ptr->total_failed_ht_search_depth != 48) ||
(cache_ptr->max_index_len != 32) || (cache_ptr->max_index_size != 2 * 1024 * 1024) ||
(cache_ptr->max_clean_index_size != 0) || (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
- (cache_ptr->max_slist_len != 32) || (cache_ptr->max_slist_size != 2 * 1024 * 1024) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->max_slist_len != 32) || (cache_ptr->max_slist_size != 2 * 1024 * 1024))) ||
(cache_ptr->max_pl_len != 0) || (cache_ptr->max_pl_size != 0) || (cache_ptr->max_pel_len != 0) ||
(cache_ptr->max_pel_size != 0) || (cache_ptr->calls_to_msic != 0) ||
(cache_ptr->total_entries_skipped_in_msic != 0) ||
@@ -41767,6 +35187,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1).";
} /* end if */
+ }
#if H5C_COLLECT_CACHE_ENTRY_STATS
if (pass)
@@ -41819,17 +35240,19 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(2).";
} /* end if */
- if (pass)
+ if (pass) {
+
if ((cache_ptr->total_ht_insertions != 32) || (cache_ptr->total_ht_deletions != 0) ||
(cache_ptr->successful_ht_searches != 32) ||
(cache_ptr->total_successful_ht_search_depth != 96) || (cache_ptr->failed_ht_searches != 32) ||
(cache_ptr->total_failed_ht_search_depth != 48) || (cache_ptr->max_index_len != 32) ||
(cache_ptr->max_index_size != 2 * 1024 * 1024) || (cache_ptr->max_clean_index_size != 0) ||
- (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) || (cache_ptr->max_slist_len != 32) ||
- (cache_ptr->max_slist_size != 2 * 1024 * 1024) || (cache_ptr->max_pl_len != 1) ||
- (cache_ptr->max_pl_size != 64 * 1024) || (cache_ptr->max_pel_len != 0) ||
- (cache_ptr->max_pel_size != 0) || (cache_ptr->calls_to_msic != 0) ||
- (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->max_slist_len != 32) || (cache_ptr->max_slist_size != 2 * 1024 * 1024))) ||
+ (cache_ptr->max_pl_len != 1) || (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) || (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 0) || (cache_ptr->total_entries_skipped_in_msic != 0) ||
(cache_ptr->total_entries_scanned_in_msic != 0) ||
(cache_ptr->max_entries_skipped_in_msic != 0) || (cache_ptr->max_entries_scanned_in_msic != 0) ||
(cache_ptr->entries_scanned_to_make_space != 0) || (cache_ptr->slist_scan_restarts != 0) ||
@@ -41838,6 +35261,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2).";
} /* end if */
+ }
#if H5C_COLLECT_CACHE_ENTRY_STATS
if (pass)
@@ -41890,18 +35314,20 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(3).";
} /* end if */
- if (pass)
+ if (pass) {
+
if ((cache_ptr->total_ht_insertions != 33) || (cache_ptr->total_ht_deletions != 1) ||
(cache_ptr->successful_ht_searches != 32) ||
(cache_ptr->total_successful_ht_search_depth != 96) || (cache_ptr->failed_ht_searches != 33) ||
(cache_ptr->total_failed_ht_search_depth != 52) || (cache_ptr->max_index_len != 32) ||
(cache_ptr->max_index_size != 2 * 1024 * 1024) ||
(cache_ptr->max_clean_index_size != 2 * 1024 * 1024) ||
- (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) || (cache_ptr->max_slist_len != 32) ||
- (cache_ptr->max_slist_size != 2 * 1024 * 1024) || (cache_ptr->max_pl_len != 1) ||
- (cache_ptr->max_pl_size != 64 * 1024) || (cache_ptr->max_pel_len != 0) ||
- (cache_ptr->max_pel_size != 0) || (cache_ptr->calls_to_msic != 1) ||
- (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->max_slist_len != 32) || (cache_ptr->max_slist_size != 2 * 1024 * 1024))) ||
+ (cache_ptr->max_pl_len != 1) || (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) || (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 1) || (cache_ptr->total_entries_skipped_in_msic != 0) ||
(cache_ptr->total_entries_scanned_in_msic != 33) ||
(cache_ptr->max_entries_skipped_in_msic != 0) || (cache_ptr->max_entries_scanned_in_msic != 33) ||
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
@@ -41910,6 +35336,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3).";
} /* end if */
+ }
#if H5C_COLLECT_CACHE_ENTRY_STATS
if (pass)
@@ -41939,14 +35366,10 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
if (pass) {
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG,
+ "Cache flush invalidate failed in check_stats__smoke_check_1()")
- if (result < 0) {
-
- pass = FALSE;
- failure_mssg = "Cache flush invalidate failed in check_stats__smoke_check_1()";
- } /* end if */
- else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
+ if ((pass) && ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0))) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after check_stats__smoke_check_1()";
@@ -41980,18 +35403,20 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(4).";
} /* end if */
- if (pass)
+ if (pass) {
+
if ((cache_ptr->total_ht_insertions != 33) || (cache_ptr->total_ht_deletions != 33) ||
(cache_ptr->successful_ht_searches != 33) ||
(cache_ptr->total_successful_ht_search_depth != 99) || (cache_ptr->failed_ht_searches != 33) ||
(cache_ptr->total_failed_ht_search_depth != 52) || (cache_ptr->max_index_len != 32) ||
(cache_ptr->max_index_size != 2 * 1024 * 1024) ||
(cache_ptr->max_clean_index_size != 2 * 1024 * 1024) ||
- (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) || (cache_ptr->max_slist_len != 32) ||
- (cache_ptr->max_slist_size != 2 * 1024 * 1024) || (cache_ptr->max_pl_len != 1) ||
- (cache_ptr->max_pl_size != 64 * 1024) || (cache_ptr->max_pel_len != 0) ||
- (cache_ptr->max_pel_size != 0) || (cache_ptr->calls_to_msic != 1) ||
- (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ ((cache_ptr->slist_enabled) &&
+ ((cache_ptr->max_slist_len != 32) || (cache_ptr->max_slist_size != 2 * 1024 * 1024))) ||
+ (cache_ptr->max_pl_len != 1) || (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) || (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 1) || (cache_ptr->total_entries_skipped_in_msic != 0) ||
(cache_ptr->total_entries_scanned_in_msic != 33) ||
(cache_ptr->max_entries_skipped_in_msic != 0) || (cache_ptr->max_entries_scanned_in_msic != 33) ||
(cache_ptr->entries_scanned_to_make_space != 33) || (cache_ptr->slist_scan_restarts != 0) ||
@@ -42000,6 +35425,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4).";
} /* end if */
+ }
#if H5C_COLLECT_CACHE_ENTRY_STATS
if (pass)
@@ -42024,8 +35450,6 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* check_stats__smoke_check_1() */
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -42433,8 +35857,6 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
}
}
- return;
-
} /* takedown_cache() */
/*-------------------------------------------------------------------------
diff --git a/test/cache_api.c b/test/cache_api.c
index b69f5bc..5d0f395 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -81,27 +81,27 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
/* size_t min_size = */ (1 * 1024 * 1024 + 1),
/* long int epoch_length = */ 50001,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.91f,
- /* double increment = */ 2.1f,
+ /* double lower_hr_threshold = */ 0.91,
+ /* double increment = */ 2.1,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.998f,
- /* double decrement = */ 0.91f,
+ /* double upper_hr_threshold = */ 0.998,
+ /* double decrement = */ 0.91,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -526,22 +526,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
/* size_t min_size = */ (1 * 1024 * 1024 + 1),
/* long int epoch_length = */ 50001,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.91f,
- /* double increment = */ 2.1f,
+ /* double lower_hr_threshold = */ 0.91,
+ /* double increment = */ 2.1,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.998f,
- /* double decrement = */ 0.91f,
+ /* double upper_hr_threshold = */ 0.998,
+ /* double decrement = */ 0.91,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
@@ -559,27 +559,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (512 * 1024),
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ (8 * 1024 * 1024),
/* size_t min_size = */ (512 * 1024),
/* long int epoch_length = */ 25000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.9,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 1.5f,
- /* double flash_threshold = */ 0.4f,
+ /* double flash_multiple = */ 1.5,
+ /* double flash_threshold = */ 0.4,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
- /* double upper_hr_threshold = */ 0.9995f,
- /* double decrement = */ 0.95f,
+ /* double upper_hr_threshold = */ 0.9995,
+ /* double decrement = */ 0.95,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (512 * 1024),
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -592,27 +592,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ (1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.90f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.90,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.1f,
- /* double flash_threshold = */ 0.6f,
+ /* double flash_multiple = */ 2.1,
+ /* double flash_threshold = */ 0.6,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ FALSE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -625,28 +625,28 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.15f,
+ /* double min_clean_fraction = */ 0.15,
/* size_t max_size = */ (20 * 1024 * 1024),
/* size_t min_size = */ (1 * 1024 * 1024),
/* long int epoch_length = */ 75000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.9,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 1.1f,
- /* double flash_threshold = */ 0.3f,
+ /* double flash_multiple = */ 1.1,
+ /* double flash_threshold = */ 0.3,
/* enum H5C_cache_decr_mode decr_mode = */
H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
+ /* double empty_reserve = */ 0.1,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -755,7 +755,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) {
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) {
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
@@ -857,7 +857,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
hbool_t valid_chunk;
hbool_t dump_hit_rate = FALSE;
int64_t min_accesses = 1000;
- double min_hit_rate = 0.90f;
+ double min_hit_rate = 0.90;
hbool_t dump_cache_size = FALSE;
hid_t file_id = -1;
hid_t dataspace_id = -1;
@@ -883,27 +883,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 500000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -916,27 +916,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 12000000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -949,27 +949,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 2000000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -1216,9 +1216,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* do random reads on all datasets */
n = 0;
while ((pass) && (n < NUM_RANDOM_ACCESSES)) {
- m = rand() % NUM_DSETS;
- i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
- j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
+ m = HDrand() % NUM_DSETS;
+ i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
+ j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
/* select on disk hyperslab */
offset[0] = (hsize_t)i; /*offset of hyperslab in file*/
@@ -1328,8 +1328,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
m = 0;
n = 0;
while ((pass) && (n < NUM_RANDOM_ACCESSES)) {
- i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
- j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
+ i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
+ j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE;
/* select on disk hyperslab */
offset[0] = (hsize_t)i; /*offset of hyperslab in file*/
@@ -1517,26 +1517,26 @@ init_invalid_configs(void)
configs[i].evictions_enabled = TRUE;
configs[i].set_initial_size = TRUE;
configs[i].initial_size = (1 * 1024 * 1024);
- configs[i].min_clean_fraction = 0.25F;
+ configs[i].min_clean_fraction = 0.25;
configs[i].max_size = (16 * 1024 * 1024);
configs[i].min_size = (1 * 1024 * 1024);
configs[i].epoch_length = 50000;
configs[i].incr_mode = H5C_incr__threshold;
- configs[i].lower_hr_threshold = 0.9F;
- configs[i].increment = 2.0F;
+ configs[i].lower_hr_threshold = 0.9;
+ configs[i].increment = 2.0;
configs[i].apply_max_increment = TRUE;
configs[i].max_increment = (4 * 1024 * 1024);
configs[i].flash_incr_mode = H5C_flash_incr__off;
- configs[i].flash_multiple = 2.0F;
- configs[i].flash_threshold = 0.5F;
+ configs[i].flash_multiple = 2.0;
+ configs[i].flash_threshold = 0.5;
configs[i].decr_mode = H5C_decr__age_out_with_threshold;
- configs[i].upper_hr_threshold = 0.999F;
- configs[i].decrement = 0.9F;
+ configs[i].upper_hr_threshold = 0.999;
+ configs[i].decrement = 0.9;
configs[i].apply_max_decrement = TRUE;
configs[i].max_decrement = (1 * 1024 * 1024);
configs[i].epochs_before_eviction = 3;
configs[i].apply_empty_reserve = TRUE;
- configs[i].empty_reserve = 0.1F;
+ configs[i].empty_reserve = 0.1;
configs[i].dirty_bytes_threshold = (256 * 1024);
configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
}
@@ -1567,10 +1567,10 @@ init_invalid_configs(void)
configs[6].initial_size = (1 * 1024 * 1024 - 1);
/* 7 -- min_clean_fraction too big */
- configs[7].min_clean_fraction = 1.000001f;
+ configs[7].min_clean_fraction = 1.000001;
/* 8 -- min_clean_fraction too small */
- configs[8].min_clean_fraction = -0.00000001f;
+ configs[8].min_clean_fraction = -0.00000001;
/* 9 -- epoch_length too small */
configs[9].epoch_length = H5C__MIN_AR_EPOCH_LENGTH - 1;
@@ -1582,46 +1582,46 @@ init_invalid_configs(void)
configs[11].incr_mode = (enum H5C_cache_incr_mode) - 1;
/* 12 -- lower_hr_threshold too small */
- configs[12].lower_hr_threshold = -0.000001f;
+ configs[12].lower_hr_threshold = -0.000001;
/* 13 -- lower_hr_threshold too big */
- configs[13].lower_hr_threshold = 1.00000001f;
+ configs[13].lower_hr_threshold = 1.00000001;
/* 14 -- increment too small */
- configs[14].increment = H5_DOUBLE(0.999999999999);
+ configs[14].increment = 0.999999999999;
/* 15 -- invalid flash_incr_mode */
configs[15].flash_incr_mode = (enum H5C_cache_flash_incr_mode) - 1;
/* 16 -- flash_multiple too small */
configs[16].flash_incr_mode = H5C_flash_incr__add_space;
- configs[16].flash_multiple = 0.09f;
+ configs[16].flash_multiple = 0.09;
/* 17 -- flash_multiple too big */
configs[17].flash_incr_mode = H5C_flash_incr__add_space;
- configs[17].flash_multiple = 10.001f;
+ configs[17].flash_multiple = 10.001;
/* 18 -- flash_threshold too small */
configs[18].flash_incr_mode = H5C_flash_incr__add_space;
- configs[18].flash_threshold = 0.099f;
+ configs[18].flash_threshold = 0.099;
/* 19 -- flash_threshold too big */
configs[19].flash_incr_mode = H5C_flash_incr__add_space;
- configs[19].flash_threshold = 1.001f;
+ configs[19].flash_threshold = 1.001;
/* 20 -- bad decr_mode */
configs[20].decr_mode = (enum H5C_cache_decr_mode) - 1;
/* 21 -- upper_hr_threshold too big */
- configs[21].upper_hr_threshold = 1.00001f;
+ configs[21].upper_hr_threshold = 1.00001;
/* 22 -- decrement too small */
configs[22].decr_mode = H5C_decr__threshold;
- configs[22].decrement = -0.0000000001f;
+ configs[22].decrement = -0.0000000001;
/* 23 -- decrement too big */
configs[23].decr_mode = H5C_decr__threshold;
- configs[23].decrement = H5_DOUBLE(1.0000000001);
+ configs[23].decrement = 1.0000000001;
/* 24 -- epochs_before_eviction too small */
configs[24].epochs_before_eviction = 0;
@@ -1630,20 +1630,20 @@ init_invalid_configs(void)
configs[25].epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1;
/* 26 -- empty_reserve too small */
- configs[26].empty_reserve = -0.0000000001f;
+ configs[26].empty_reserve = -0.0000000001;
/* 27 -- empty_reserve too big */
- configs[27].empty_reserve = H5_DOUBLE(1.00000000001);
+ configs[27].empty_reserve = 1.00000000001;
/* 28 -- upper_hr_threshold too small */
- configs[28].upper_hr_threshold = -0.000000001f;
+ configs[28].upper_hr_threshold = -0.000000001;
/* 29 -- upper_hr_threshold too big */
- configs[29].upper_hr_threshold = H5_DOUBLE(1.00000001);
+ configs[29].upper_hr_threshold = 1.00000001;
/* 30 -- upper_hr_threshold <= lower_hr_threshold */
- configs[30].lower_hr_threshold = 0.9f;
- configs[30].upper_hr_threshold = 0.9f;
+ configs[30].lower_hr_threshold = 0.9;
+ configs[30].upper_hr_threshold = 0.9;
/* 31 -- dirty_bytes_threshold too small */
configs[31].dirty_bytes_threshold = (H5C__MIN_MAX_CACHE_SIZE / 2) - 1;
diff --git a/test/cache_common.c b/test/cache_common.c
index b1b69f9..7269c49 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -434,8 +434,6 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr)
*type_ptr = type;
*index_ptr = idx;
- return;
-
} /* addr_to_type_and_index() */
/* Call back functions: */
@@ -721,9 +719,11 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
else {
if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) {
HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%x 0x%x 0x%x\n", (int)(*((const char *)image)),
- (int)(*(((const char *)image) + 1)), (int)(*(((const char *)image) + 2)));
- HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF), (int)((idx & 0xFF00) >> 8));
+ HDfprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
+ (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)),
+ (*(((const uint8_t *)image) + 2)));
+ HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF,
+ (((uint32_t)idx & 0xFF00) >> 8));
} /* end if */
HDassert((*((const char *)image)) == (char)(type & 0xFF));
HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
@@ -1513,8 +1513,6 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb
(target_entry_ptr->flush_ops)[i].order_ptr = order_ptr;
}
- return;
-
} /* add_flush_op() */
/*-------------------------------------------------------------------------
@@ -1584,8 +1582,6 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
(pinned_entry_ptr->pinning_ref_count)++;
}
- return;
-
} /* create_pinned_entry_dependency() */
/*-------------------------------------------------------------------------
@@ -1658,8 +1654,6 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
}
}
- return;
-
} /* dirty_entry() */
/*-------------------------------------------------------------------------
@@ -1689,7 +1683,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
HDassert(cache_ptr != NULL);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(entry_ptr != NULL);
- HDassert(entry_ptr = entry_ptr->self);
+ HDassert(entry_ptr == entry_ptr->self);
HDassert(entry_ptr->header.addr == entry_ptr->addr);
HDassert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size));
HDassert(op_ptr != NULL);
@@ -1803,8 +1797,6 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
}
}
- return;
-
} /* execute_flush_op() */
/*-------------------------------------------------------------------------
@@ -2030,8 +2022,6 @@ free_entry_arrays(void)
HDfree(notify_entries);
HDfree(orig_notify_entries);
- return;
-
} /* free_entry_arrays() */
/*-------------------------------------------------------------------------
@@ -2175,8 +2165,6 @@ reset_entries(void)
} /* end for */
} /* end else */
- return;
-
} /* reset_entries() */
/*-------------------------------------------------------------------------
@@ -2255,7 +2243,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
}
else {
- HDassert(entry_ptr->size = (entry_ptr->header).size);
+ HDassert(entry_ptr->size == (entry_ptr->header).size);
}
}
}
@@ -2268,8 +2256,6 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
}
}
- return;
-
} /* resize_entry() */
/*-------------------------------------------------------------------------
@@ -2321,8 +2307,6 @@ verify_clean(void)
}
}
- return;
-
} /* verify_clean() */
/*-------------------------------------------------------------------------
@@ -2619,8 +2603,6 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
i++;
} /* while */
- return;
-
} /* verify_entry_status() */
/*-------------------------------------------------------------------------
@@ -2674,8 +2656,6 @@ verify_unprotected(void)
}
}
- return;
-
} /* verify_unprotected() */
/*-------------------------------------------------------------------------
@@ -2739,20 +2719,31 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
}
}
- return;
-
} /* expunge_entry() */
/*-------------------------------------------------------------------------
* Function: flush_cache()
*
* Purpose: Flush the specified cache, destroying all entries if
- requested. If requested, dump stats first.
+ * requested. If requested, dump stats first.
*
* Return: void
*
* Programmer: John Mainzer
- * 6/23/04
+ * 6/23/04
+ *
+ * Changes: Added code to setup and take down the skip list before
+ * and after calls to H5C_flush_cache(). Do this via calls
+ * to the H5C_FLUSH_CACHE macro.
+ *
+ * This is necessary, as H5C_flush() is called repeatedly
+ * during file flush. If we setup and took down the
+ * skip list on H5C_flush_cache(), we would find ourselves
+ * doing this repeatedly -- which is contrary to the
+ * objective of the exercise (avoiding as many skip list
+ * operations as possible).
+ *
+ * JRM -- 5/14/20
*
*-------------------------------------------------------------------------
*/
@@ -2766,30 +2757,31 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
if (pass) {
H5C_t *cache_ptr;
- herr_t result = 0;
HDassert(file_ptr);
cache_ptr = file_ptr->shared->cache;
- if (destroy_entries)
- result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
+ if (destroy_entries) {
- else
- result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
+ H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, "error in H5C_flush_cache().")
+ }
+ else {
- if (dump_stats)
- H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
+ H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "error in H5C_flush_cache().")
+ }
- if (result < 0) {
- pass = FALSE;
- failure_mssg = "error in H5C_flush_cache().";
+ if (dump_stats) {
+
+ H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
- else if ((destroy_entries) &&
- ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
- (cache_ptr->clean_index_size != 0) || (cache_ptr->dirty_index_size != 0))) {
+
+ if ((pass) && (destroy_entries) &&
+ ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
+ (cache_ptr->clean_index_size != 0) || (cache_ptr->dirty_index_size != 0))) {
if (verbose) {
+
HDfprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", FUNC,
(long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
(long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
@@ -2799,8 +2791,6 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
}
}
- return;
-
} /* flush_cache() */
/*-------------------------------------------------------------------------
@@ -2968,8 +2958,6 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
HDassert(((entry_ptr->header).type)->id == type);
} /* end if */
- return;
-
} /* insert_entry() */
/*-------------------------------------------------------------------------
@@ -3029,8 +3017,6 @@ mark_entry_dirty(int32_t type, int32_t idx)
HDassert(((entry_ptr->header).type)->id == type);
}
- return;
-
} /* mark_entry_dirty() */
/*-------------------------------------------------------------------------
@@ -3129,8 +3115,6 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
HDassert(entry_ptr->is_dirty);
}
- return;
-
} /* move_entry() */
/*-------------------------------------------------------------------------
@@ -3297,8 +3281,6 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
HDassert(((entry_ptr->header).type)->id == type);
}
- return;
-
} /* protect_entry_ro() */
/*-------------------------------------------------------------------------
@@ -3355,8 +3337,6 @@ pin_entry(int32_t type, int32_t idx)
}
} /* end if */
- return;
-
} /* pin_entry() */
/*-------------------------------------------------------------------------
@@ -3414,8 +3394,6 @@ unpin_entry(int32_t type, int32_t idx)
HDassert(((entry_ptr->header).type)->id == type);
}
- return;
-
} /* unpin_entry() */
/*-------------------------------------------------------------------------
@@ -3525,22 +3503,25 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count);
}
- return;
-
} /* unprotect_entry() */
/*-------------------------------------------------------------------------
* Function: row_major_scan_forward()
*
* Purpose: Do a sequence of inserts, protects, unprotects, moves,
- * destroys while scanning through the set of entries. If
- * pass is false on entry, do nothing.
+ * destroys while scanning through the set of entries. If
+ * pass is false on entry, do nothing.
*
* Return: void
*
* Programmer: John Mainzer
* 6/12/04
*
+ * Changes: Updated slist size == dirty index size checks to
+ * bypass the test if cache_ptr->slist_enabled is FALSE.
+ *
+ * JRM -- 5/8/20
+ *
*-------------------------------------------------------------------------
*/
void
@@ -3584,7 +3565,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3594,7 +3577,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3604,7 +3589,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
@@ -3614,7 +3601,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3624,7 +3613,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx -= 2;
@@ -3634,7 +3625,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_mult_ro_protects) {
@@ -3645,7 +3638,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3655,7 +3650,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3665,7 +3662,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
@@ -3675,7 +3674,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3685,7 +3686,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3695,7 +3698,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* if ( do_mult_ro_protects ) */
@@ -3704,7 +3709,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "13(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx = idx - lag + 2;
@@ -3714,7 +3721,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3724,7 +3733,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_destroys) {
@@ -3736,7 +3747,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 1:
@@ -3745,7 +3758,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
@@ -3753,7 +3768,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
@@ -3762,7 +3779,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 3:
@@ -3771,7 +3790,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
HDfprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
@@ -3780,7 +3801,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) |
H5C__DELETED_FLAG);
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
@@ -3798,7 +3821,9 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
+
+ HDassert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* end elsef */
@@ -3906,8 +3931,6 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* hl_row_major_scan_forward() */
/*-------------------------------------------------------------------------
@@ -4168,8 +4191,6 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* row_major_scan_backward() */
/*-------------------------------------------------------------------------
@@ -4262,8 +4283,6 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* hl_row_major_scan_backward() */
/*-------------------------------------------------------------------------
@@ -4356,8 +4375,6 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* col_major_scan_forward() */
/*-------------------------------------------------------------------------
@@ -4461,8 +4478,6 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* hl_col_major_scan_forward() */
/*-------------------------------------------------------------------------
@@ -4567,8 +4582,6 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if (verbose)
HDfprintf(stdout, "%s: exiting.\n", FUNC);
- return;
-
} /* col_major_scan_backward() */
/*-------------------------------------------------------------------------
@@ -4672,8 +4685,6 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
}
- return;
-
} /* hl_col_major_scan_backward() */
/*-------------------------------------------------------------------------
@@ -5042,8 +5053,6 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
failure_mssg = "Unexpectedly low hit rate.";
}
- return;
-
} /* check_and_validate_cache_hit_rate() */
/*-------------------------------------------------------------------------
@@ -5161,8 +5170,6 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
(long)min_clean_size, (long)cur_size, (long)cur_num_entries);
}
- return;
-
} /* check_and_validate_cache_size() */
H5_ATTR_PURE hbool_t
@@ -5323,8 +5330,6 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t
}
}
- return;
-
} /* validate_mdc_config() */
#if 0 /* debugging functions -- normally commented out */
diff --git a/test/cache_common.h b/test/cache_common.h
index f466f8e..126a8b3 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -17,8 +17,8 @@
* This file contains common #defines, type definitions, and
* externs for tests of the cache implemented in H5C.c
*/
-#ifndef _CACHE_COMMON_H
-#define _CACHE_COMMON_H
+#ifndef CACHE_COMMON_H
+#define CACHE_COMMON_H
#define H5C_FRIEND /*suppress error about including H5Cpkg */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
@@ -116,6 +116,62 @@
#define MAX_ADDR (haddr_t)(NOTIFY_ALT_BASE_ADDR + (NOTIFY_ENTRY_SIZE * NUM_NOTIFY_ENTRIES))
#define ADDR_SPACE_SIZE (haddr_t)(MAX_ADDR - BASE_ADDR)
+/***********************************************************************
+ *
+ * Macro: H5C_FLUSH_CACHE
+ *
+ * Purpose: Wrap a call to H5C_flush_cache() in calls to
+ * H5C_set_slist_enabled() to setup and take down the slist.
+ *
+ * This is necessary, as H5C_flush_cache() needs the
+ * slist to be active. Further, since it is called
+ * repeatedly during file flush, it would be inefficient
+ * for it to setup the slist on entry, and take it down
+ * on exit.
+ *
+ * Note that the slist need not be empty if the flags
+ * indicate a partial flush (i.e.
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG). Compute clear_slist
+ * and pass it into H5C_set_slist_enabled as appropriate.
+ *
+ * On error, set pass to FALSE, and set failure_mssg
+ * to the supplied error message.
+ *
+ * Return: N/A
+ *
+ * Programmer: John Mainzer
+ * 5/14/20
+ *
+ * Changes: None.
+ *
+ ***********************************************************************/
+
+#define H5C_FLUSH_CACHE(file, flags, fail_mssg) \
+ { \
+ hbool_t clear_slist; \
+ herr_t rslt; \
+ \
+ clear_slist = ((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0); \
+ \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, TRUE, FALSE); \
+ \
+ if (rslt >= 0) { \
+ \
+ rslt = H5C_flush_cache((file), (flags)); \
+ } \
+ \
+ if (rslt >= 0) { \
+ \
+ rslt = H5C_set_slist_enabled((file)->shared->cache, FALSE, clear_slist); \
+ } \
+ \
+ if (rslt < 0) { \
+ \
+ pass = FALSE; \
+ failure_mssg = (fail_mssg); \
+ } \
+ } /* H5C_FLUSH_CACHE */
+
#define MAX_PINS \
8 /* Maximum number of entries that can be \
* directly pinned by a single entry. \
@@ -638,4 +694,4 @@ H5TEST_DLL void dump_LRU(H5F_t * file_ptr);
}
#endif
-#endif /* _CACHE_COMMON_H */
+#endif /* CACHE_COMMON_H */
diff --git a/test/cache_image.c b/test/cache_image.c
index e5c3cb8..40d6f05 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -387,8 +387,6 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
}
- return;
-
} /* create_datasets() */
/*-------------------------------------------------------------------------
@@ -460,8 +458,6 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
if (show_progress)
HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- return;
-
} /* delete_datasets() */
/*-------------------------------------------------------------------------
@@ -850,8 +846,6 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (show_progress)
HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++);
- return;
-
} /* open_hdf5_file() */
/*-------------------------------------------------------------------------
@@ -963,8 +957,6 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (show_progress)
HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- return;
-
} /* attempt_swmr_open_hdf5_file() */
/*-------------------------------------------------------------------------
@@ -1202,8 +1194,6 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
}
- return;
-
} /* verify_datasets() */
/****************************************************************************/
@@ -7863,8 +7853,8 @@ main(void)
HDprintf("=========================================\n");
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
nerrs += check_cache_image_ctl_flow_1(single_file_vfd);
nerrs += check_cache_image_ctl_flow_2(single_file_vfd);
diff --git a/test/cache_logging.c b/test/cache_logging.c
index baf84f8..af43845 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -58,6 +58,12 @@ test_logging_api(void)
if (H5Pset_mdc_log_options(fapl, is_enabled, LOG_LOCATION, start_on_access) < 0)
TEST_ERROR;
+ /* Ensure that setting the property twice doesn't cause problems
+ * (addresses a previous bug).
+ */
+ if (H5Pset_mdc_log_options(fapl, is_enabled, LOG_LOCATION, start_on_access) < 0)
+ TEST_ERROR;
+
/* Check to make sure that the property list getter returns the correct
* location string buffer size;
*/
@@ -76,7 +82,7 @@ test_logging_api(void)
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
if ((is_enabled != is_enabled_out) || (start_on_access != start_on_access_out) ||
- HDstrcmp(LOG_LOCATION, location))
+ HDstrcmp(LOG_LOCATION, location) != 0)
TEST_ERROR;
/* Create a file */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index b4af425..d03caec 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -343,11 +343,20 @@ evict_entries(hid_t fid)
/* Mark all entries investigated */
mark_all_entries_investigated(fid);
+ /* setup the skip list prior to calling H5C_flush_cache() */
+ if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ TEST_ERROR;
+
/* 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. */
+ * is still protected. Thus, don't check its return value.
+ */
H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
+ /* shutdown the slist -- allow it to be non-empty */
+ if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ TEST_ERROR;
+
return 0;
error:
@@ -435,7 +444,7 @@ check_file_creation_tags(hid_t fcpl_id, int type)
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose test outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -539,7 +548,7 @@ check_file_open_tags(hid_t fcpl, int type)
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag; /* Root Group Tag */
haddr_t sbe_tag; /* Sblock Extension Tag */
@@ -669,7 +678,7 @@ check_group_creation_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
haddr_t g_tag; /* Group Tag */
@@ -792,7 +801,7 @@ check_multi_group_creation_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
char gname[16]; /* group name buffer */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access prop list */
@@ -944,7 +953,7 @@ check_link_iteration_tags(void)
hid_t did = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
int i = 0; /* iterator */
haddr_t root_tag = 0; /* Root Group Tag Value */
char dsetname[500]; /* Name of dataset */
@@ -1086,7 +1095,7 @@ check_dense_attribute_tags(void)
hid_t dcpl = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access property list */
haddr_t d_tag = 0; /* Dataset tag value */
@@ -1316,7 +1325,7 @@ check_group_open_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1447,7 +1456,7 @@ check_attribute_creation_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
@@ -1612,7 +1621,7 @@ check_attribute_open_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
@@ -1779,7 +1788,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1992,7 +2001,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -2183,7 +2192,7 @@ check_dataset_creation_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2343,7 +2352,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2509,7 +2518,7 @@ check_dataset_open_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2661,7 +2670,7 @@ check_dataset_write_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2828,7 +2837,7 @@ check_attribute_write_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -3014,7 +3023,7 @@ check_dataset_read_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3176,7 +3185,7 @@ check_dataset_size_retrieval(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3340,7 +3349,7 @@ check_dataset_extend_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3502,7 +3511,7 @@ check_object_info_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3637,7 +3646,7 @@ check_object_copy_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3787,7 +3796,7 @@ check_link_removal_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3976,7 +3985,7 @@ check_link_getname_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -4153,7 +4162,7 @@ check_external_link_creation_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
@@ -4280,7 +4289,7 @@ check_external_link_open_tags(void)
hid_t xid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif /* NDEBUG */
H5O_native_info_t ninfo; /* Native object info struct */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 344a8f1..7f39557 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -127,7 +127,7 @@ void reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size);
static int verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type,
hsize_t exp_num_chunks);
static int verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
- hsize_t *exp_offset, unsigned exp_flt_msk);
+ const hsize_t *exp_offset, unsigned exp_flt_msk);
static int verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size,
unsigned exp_flt_msk);
static int verify_empty_chunk_info(hid_t dset, hsize_t *offset);
@@ -169,8 +169,8 @@ reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size)
*-------------------------------------------------------------------------
*/
static int
-verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size, hsize_t *exp_offset,
- unsigned exp_flt_msk)
+verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
+ const hsize_t *exp_offset, unsigned exp_flt_msk)
{
unsigned read_flt_msk = 0; /* Read filter mask */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
@@ -302,7 +302,7 @@ index_type_str(H5D_chunk_index_t idx_type)
*-------------------------------------------------------------------------
*/
static int
-verify_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end)
+verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsize_t *end)
{
int read_buf[CHUNK_NX][CHUNK_NY];
int expected_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Expected data */
@@ -335,8 +335,9 @@ verify_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end)
/* Verify that read chunk is the same as the corresponding written one */
if (HDmemcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) {
- HDfprintf(stderr, "Read chunk differs from written chunk at offset (%d,%d)\n", offset[0],
- offset[1]);
+ HDfprintf(stderr,
+ "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n",
+ offset[0], offset[1]);
return FAIL;
}
}
@@ -363,7 +364,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-write_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end, unsigned flt_msk)
+write_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsize_t *end, unsigned flt_msk)
{
int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */
hsize_t offset[2]; /* Offset coordinates of a chunk */
@@ -420,7 +421,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Ensure the correct chunk indexing scheme is used */
if (idx_type != exp_idx_type) {
char msg[256];
- sprintf(msg, "Should be using %s.\n", index_type_str(idx_type));
+ HDsprintf(msg, "Should be using %s.\n", index_type_str(idx_type));
FAIL_PUTS_ERROR(msg);
}
@@ -541,7 +542,7 @@ test_get_chunk_info_highest_v18(hid_t fapl)
#ifdef H5_HAVE_FILTER_DEFLATE
/* Allocate input (compressed) buffer */
- inbuf = malloc(z_dst_nbytes);
+ inbuf = HDmalloc(z_dst_nbytes);
/* Set chunk size to the compressed chunk size and the chunk point
to the compressed data chunk */
@@ -553,20 +554,20 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
- fprintf(stderr, "overflow");
+ HDfprintf(stderr, "overflow");
TEST_ERROR
}
else if (Z_MEM_ERROR == ret) {
- fprintf(stderr, "deflate memory error");
+ HDfprintf(stderr, "deflate memory error");
TEST_ERROR
}
else if (Z_OK != ret) {
- fprintf(stderr, "other deflate error");
+ HDfprintf(stderr, "other deflate error");
TEST_ERROR
}
#else
/* Allocate input (non-compressed) buffer */
- inbuf = malloc(CHK_SIZE);
+ inbuf = HDmalloc(CHK_SIZE);
HDmemcpy(inbuf, direct_buf, CHK_SIZE);
#endif /* end H5_HAVE_FILTER_DEFLATE */
@@ -709,7 +710,8 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Verify that the number of chunks is NUM_CHUNKS */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR
- VERIFY(nchunks, NUM_CHUNKS, "H5Dget_num_chunks, number of chunks");
+ if (nchunks != NUM_CHUNKS)
+ TEST_ERROR
/* Attempt to get info of a chunk from an empty dataset, verify the
returned address and size in the case of H5D_ALLOC_TIME_EARLY */
@@ -718,11 +720,12 @@ test_get_chunk_info_highest_v18(hid_t fapl)
ret = H5Dget_chunk_info(dset, dspace, chk_index, out_offset, &read_flt_msk, &addr, &size);
if (ret < 0)
TEST_ERROR
+
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if (addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if (size == EMPTY_CHK_SIZE)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
chk_index = 10;
reinit_vars(&read_flt_msk, &addr, &size);
@@ -731,9 +734,9 @@ test_get_chunk_info_highest_v18(hid_t fapl)
TEST_ERROR
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if (addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if (size == EMPTY_CHK_SIZE)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
/* Attempt to get info of a chunk given its coords from an empty dataset,
verify the returned address and size */
@@ -743,9 +746,9 @@ test_get_chunk_info_highest_v18(hid_t fapl)
TEST_ERROR
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if (addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if (size == 0)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
if (H5Dclose(dset) < 0)
TEST_ERROR
@@ -855,7 +858,8 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
/* Get the number of chunks and verify that no chunk has been written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR
- VERIFY(nchunks, NO_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (nchunks != NO_CHUNK_WRITTEN)
+ TEST_ERROR
/* Initialize the array of chunk data for the single chunk */
for (ii = 0; ii < NX; ii++)
@@ -869,7 +873,8 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
/* Get and verify that one chunk had been written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR
- VERIFY(nchunks, ONE_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (nchunks != ONE_CHUNK_WRITTEN)
+ TEST_ERROR
/* Offset of the only chunk */
offset[0] = 0;
@@ -1633,7 +1638,7 @@ test_basic_query(hid_t fapl)
TEST_ERROR
/* Remove the test file */
- remove(filename);
+ HDremove(filename);
PASSED();
return SUCCEED;
@@ -2041,7 +2046,7 @@ test_flt_msk_with_skip_compress(hid_t fapl)
TEST_ERROR
/* Remove the test file */
- remove(filename);
+ HDremove(filename);
PASSED();
return SUCCEED;
@@ -2067,8 +2072,7 @@ error:
*
* Purpose: Tests functions related to chunk information
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Binh-Minh Ribler
* November 5, 2018
@@ -2100,18 +2104,18 @@ main(void)
nerrors += test_flt_msk_with_skip_compress(fapl) < 0 ? 1 : 0;
if (nerrors)
- TEST_ERROR
+ goto error;
HDprintf("All chunk query tests passed.\n");
h5_cleanup(FILENAME, fapl);
- return SUCCEED;
+ return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
HDprintf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- return FAIL;
+ return EXIT_FAILURE;
}
/****************************************************************************
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 25fa3f0..e74b438 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, January 23, 1998
*/
@@ -302,7 +302,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] ||
s1[i].d != s2[i].d || s1[i].e != s2[i].e) {
H5_FAILED();
- puts(" Incorrect values read from the file");
+ HDputs(" Incorrect values read from the file");
goto error;
}
}
@@ -339,7 +339,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] ||
s1[i].d != s3[i].d || s1[i].e != s3[i].e) {
H5_FAILED();
- puts(" Incorrect values read from the file");
+ HDputs(" Incorrect values read from the file");
goto error;
}
}
@@ -369,7 +369,7 @@ test_compound(char *filename, hid_t fapl)
for (i = 0; i < NX * NY; i++) {
if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) {
H5_FAILED();
- puts(" Incorrect values read from the file");
+ HDputs(" Incorrect values read from the file");
goto error;
}
}
@@ -413,7 +413,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] ||
s1[i].d != s5[i].d || s1[i].e != s5[i].e) {
H5_FAILED();
- puts(" Incorrect values read from the file");
+ HDputs(" Incorrect values read from the file");
goto error;
}
}
@@ -423,7 +423,7 @@ test_compound(char *filename, hid_t fapl)
if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i ||
s5[i].post != 1003 + 4 * i) {
H5_FAILED();
- puts(" Memory values were clobbered");
+ HDputs(" Memory values were clobbered");
goto error;
}
}
@@ -482,7 +482,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] ||
s1[i].d != s6[i].d || s1[i].e != s6[i].e) {
H5_FAILED();
- puts(" Incorrect values read from the file");
+ HDputs(" Incorrect values read from the file");
goto error;
}
}
@@ -492,7 +492,7 @@ test_compound(char *filename, hid_t fapl)
if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i ||
s6[i].post != 1003 + 4 * i) {
H5_FAILED();
- puts(" Memory values were clobbered");
+ HDputs(" Memory values were clobbered");
goto error;
}
}
@@ -561,7 +561,7 @@ test_compound(char *filename, hid_t fapl)
s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] ||
s2[i].d != s1[i].d || s2[i].e != s1[i].e) {
H5_FAILED();
- puts(" Incorrect values read from file");
+ HDputs(" Incorrect values read from file");
goto error;
}
}
@@ -590,7 +590,7 @@ test_compound(char *filename, hid_t fapl)
/* Read the dataset */
s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t));
- assert(s8);
+ HDassert(s8);
if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) {
goto error;
}
@@ -604,7 +604,7 @@ test_compound(char *filename, hid_t fapl)
if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] ||
ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) {
H5_FAILED();
- puts(" Incorrect values read from file");
+ HDputs(" Incorrect values read from file");
goto error;
}
}
@@ -643,7 +643,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] ||
ps2->d != ps1->d || ps2->e != ps1->e) {
H5_FAILED();
- puts(" Memory values clobbered");
+ HDputs(" Memory values clobbered");
goto error;
}
}
@@ -652,7 +652,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) ||
ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) {
H5_FAILED();
- puts(" Incorrect values read from file");
+ HDputs(" Incorrect values read from file");
goto error;
}
}
@@ -691,7 +691,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) ||
ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- puts(" Memory values clobbered");
+ HDputs(" Memory values clobbered");
goto error;
}
}
@@ -702,7 +702,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) ||
ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- puts(" Incorrect values read from file");
+ HDputs(" Incorrect values read from file");
goto error;
}
}
@@ -723,7 +723,7 @@ test_compound(char *filename, hid_t fapl)
h_size[0] = 2 * NX / 3 - f_offset[0];
h_size[1] = 2 * NY / 3 - f_offset[1];
s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t));
- assert(s11);
+ HDassert(s11);
/* Initialize */
for (i = 0; i < h_size[0] * h_size[1]; i++) {
@@ -751,7 +751,7 @@ test_compound(char *filename, hid_t fapl)
ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 ||
ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) {
H5_FAILED();
- puts(" Write clobbered values");
+ HDputs(" Write clobbered values");
goto error;
}
@@ -759,14 +759,14 @@ test_compound(char *filename, hid_t fapl)
j < f_offset[1] + h_size[1]) {
if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) {
H5_FAILED();
- puts(" Wrong values written or read");
+ HDputs(" Wrong values written or read");
goto error;
}
}
else {
if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) {
H5_FAILED();
- puts(" Write clobbered values");
+ HDputs(" Write clobbered values");
goto error;
}
}
@@ -792,7 +792,7 @@ test_compound(char *filename, hid_t fapl)
return 0;
error:
- puts("*** DATASET TESTS FAILED ***");
+ HDputs("*** DATASET TESTS FAILED ***");
/* Release resources */
if (s1)
@@ -1669,7 +1669,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
return 0;
error:
- puts("*** DATASET TESTS FAILED ***");
+ HDputs("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1684,7 +1684,7 @@ error:
for (_i = 0; _i < PACK_NMEMBS; _i++) \
HDprintf(" %d", order[_i]); \
HDprintf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \
- fflush(stdout); \
+ HDfflush(stdout); \
goto error; \
}
@@ -1719,7 +1719,7 @@ test_pack_ooo(void)
* the compound */
unsigned i, j; /* Indices */
- HDsrand((unsigned)time(NULL));
+ HDsrand((unsigned)HDtime(NULL));
/* Initialize "free_order" array to indicate that all slots in order are
* free */
@@ -2233,7 +2233,7 @@ main(int argc, char *argv[])
/* Turn off optimized compound converter? */
if (argc > 1) {
- if (argc > 2 || strcmp("--noopt", argv[1])) {
+ if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
HDexit(EXIT_FAILURE);
}
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
new file mode 100644
index 0000000..ef5ad75
--- /dev/null
+++ b/test/cmpd_dtransform.c
@@ -0,0 +1,136 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Jan-Willem Blokland
+ * December 1, 2020
+ *
+ * Purpose: Test writing compounded attribute followed by
+ * writing data with a data transform function.
+ */
+
+#include "h5test.h"
+
+#define FILENAME "cmpd_dtransform.h5"
+#define LENGTH 11
+
+typedef struct {
+ char name[64];
+ char unit[64];
+} att_t;
+
+int
+main(void)
+{
+ hsize_t dima[] = {1};
+ hsize_t dims[] = {LENGTH};
+ hid_t str_dtyp_id, att_dtyp_id, file_id, fspace_id, dset_id, att_dspc_id, att_attr_id, dxpl_id;
+
+ /* Compound datatype */
+ att_t *atts = HDmalloc(sizeof(att_t));
+ HDstrcpy(atts[0].name, "Name");
+ HDstrcpy(atts[0].unit, "Unit");
+
+ /* String type */
+ if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0)
+ TEST_ERROR;
+ H5Tset_size(str_dtyp_id, 64);
+
+ /* Attribute type */
+ if ((att_dtyp_id = H5Tcreate(H5T_COMPOUND, sizeof(att_t))) < 0)
+ TEST_ERROR;
+ H5Tinsert(att_dtyp_id, "NAME", HOFFSET(att_t, name), str_dtyp_id);
+ H5Tinsert(att_dtyp_id, "UNIT", HOFFSET(att_t, unit), str_dtyp_id);
+
+ /* Create file. */
+ if ((file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create file dataspace. */
+ if ((fspace_id = H5Screate_simple(1, dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Create dataset. */
+ if ((dset_id = H5Dcreate2(file_id, "test_dset", H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Write the attribute (compound) to the dataset */
+ if ((att_dspc_id = H5Screate_simple(1, dima, NULL)) < 0)
+ TEST_ERROR;
+ if ((att_attr_id =
+ H5Acreate2(dset_id, "ATTRIBUTES", att_dtyp_id, att_dspc_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if (H5Awrite(att_attr_id, att_dtyp_id, atts) < 0)
+ TEST_ERROR;
+
+ /* Create dataset transfer property list */
+ const char *expr = "2*x";
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+ if (H5Pset_data_transform(dxpl_id, expr) < 0) {
+ HDprintf("**** ERROR: H5Pset_data_transform (expression: %s) ****\n", expr);
+ TEST_ERROR;
+ }
+
+ int *data = HDmalloc(LENGTH * sizeof(int));
+ int *data_res = HDmalloc(LENGTH * sizeof(int));
+ for (unsigned i = 0; i < LENGTH; i++) {
+ data[i] = 10;
+ data_res[i] = 2 * data[i];
+ }
+
+ /* Write the data */
+ if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, data) < 0)
+ TEST_ERROR;
+
+ /* Read attribute */
+ att_t *atts_res = HDmalloc(sizeof(att_t));
+ if (H5Aread(att_attr_id, att_dtyp_id, atts_res) < 0)
+ TEST_ERROR;
+
+ /* Verify attribute */
+ if (HDstrcmp(atts_res[0].name, atts[0].name) != 0)
+ TEST_ERROR;
+ if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0)
+ TEST_ERROR;
+
+ /* Read the data */
+ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ TEST_ERROR;
+
+ /* Verify data */
+ for (unsigned idx = 0; idx < LENGTH; idx++) {
+ if (data[idx] != data_res[idx])
+ TEST_ERROR;
+ }
+
+ HDfree(atts);
+ HDfree(atts_res);
+ HDfree(data);
+ HDfree(data_res);
+
+ /* Close all identifiers. */
+ H5Pclose(dxpl_id);
+ H5Aclose(att_attr_id);
+ H5Sclose(att_dspc_id);
+ H5Dclose(dset_id);
+ H5Sclose(fspace_id);
+ H5Fclose(file_id);
+ H5Tclose(att_dtyp_id);
+ H5Tclose(str_dtyp_id);
+
+ return 0;
+
+error:
+ return 1;
+}
diff --git a/test/cork.c b/test/cork.c
index 5f12347..80934ad 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/cross_read.c b/test/cross_read.c
index 0edaa0f..eef814f 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Thursday, March 23, 2006
*
* Purpose: Check if floating-point data created on big-endian and
@@ -159,9 +159,9 @@ check_data_f(const char *dsetname, hid_t fid)
/* Input (last row is different) */
for (i = 0; i < NX; i++)
for (j = 0; j < NY; j++)
- data_in[i][j] = ((double)(i + j + 1)) / (double)3.0F;
+ data_in[i][j] = ((double)(i + j + 1)) / 3.0;
for (i = 0; i < NY; i++)
- data_in[NX][i] = -2.2F;
+ data_in[NX][i] = -2.2;
/* Output */
HDmemset(data_out, 0, (NX + 1) * NY * sizeof(double));
@@ -174,7 +174,7 @@ check_data_f(const char *dsetname, hid_t fid)
/* Check results */
for (i = 0; i < (NX + 1); i++)
for (j = 0; j < NY; j++)
- if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], (double)0.001F))
+ if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], 0.001))
if (!nerrors++) {
H5_FAILED();
HDprintf("element [%d][%d] is %g but should have been %g\n", (int)i, (int)j,
diff --git a/test/dangle.c b/test/dangle.c
index d241a4a..d41507b 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Purpose: Test dangling IDs
@@ -663,7 +663,7 @@ main(void)
int nerrors = 0;
/* Run tests w/weak file close */
- puts("Testing dangling objects with weak file close:");
+ HDputs("Testing dangling objects with weak file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_WEAK);
nerrors += test_dangle_group(H5F_CLOSE_WEAK);
nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK);
@@ -671,7 +671,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_WEAK);
/* Run tests w/semi file close */
- puts("Testing dangling objects with semi file close:");
+ HDputs("Testing dangling objects with semi file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_SEMI);
nerrors += test_dangle_group(H5F_CLOSE_SEMI);
nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI);
@@ -679,7 +679,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_SEMI);
/* Run tests w/strong file close */
- puts("Testing dangling objects with strong file close:");
+ HDputs("Testing dangling objects with strong file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_STRONG);
nerrors += test_dangle_group(H5F_CLOSE_STRONG);
nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG);
@@ -692,11 +692,11 @@ main(void)
/* Check for errors */
if (nerrors)
goto error;
- puts("All dangling ID tests passed.");
+ HDputs("All dangling ID tests passed.");
return 0;
error:
- puts("***** DANGLING ID TESTS FAILED *****");
+ HDputs("***** DANGLING ID TESTS FAILED *****");
return 1;
}
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 6048c3f..cf7f607 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -58,17 +58,17 @@ catch_signal(int H5_ATTR_UNUSED signo)
int
main(void)
{
- hid_t fid = -1; /* HDF5 File ID */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t fapl = -1; /* File access property lists */
- hid_t gcpl = -1; /* Group creation property list */
- char aname[50]; /* Name of attribute */
- char *basename = "attr"; /* Name prefix for attribute */
- char filename[100]; /* File name */
- int i; /* Local index variable */
+ hid_t fid = -1; /* HDF5 File ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t fapl = -1; /* File access property lists */
+ hid_t gcpl = -1; /* Group creation property list */
+ char aname[50]; /* Name of attribute */
+ const char *basename = "attr"; /* Name prefix for attribute */
+ char filename[100]; /* File name */
+ int i; /* Local index variable */
/* Testing setup */
h5_reset();
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index 0302278..61e3df9 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -43,7 +43,7 @@
#define CHUNK_NX 4
#define CHUNK_NY 4
-#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * H5_DOUBLE(1.001)) + H5_DOUBLE(12.0))
+#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12.0)
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS1 305
@@ -2326,7 +2326,7 @@ main(void)
need_comma = TRUE;
} /* end if */
HDprintf(":\n");
- fflush(stdout);
+ HDfflush(stdout);
nerrors += test_single_chunk(config);
} /* end for */
diff --git a/test/dsets.c b/test/dsets.c
index 87c8242..3b38242 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the dataset interface (H5D)
@@ -82,6 +82,7 @@ const char *FILENAME[] = {"dataset", /* 0 */
"dls_01_strings", /* 23 */
"power2up", /* 24 */
"version_bounds", /* 25 */
+ "alloc_0sized", /* 26 */
NULL};
#define OHMIN_FILENAME_A "ohdr_min_a"
@@ -109,6 +110,8 @@ const char *FILENAME[] = {"dataset", /* 0 */
#define DSET_FLETCHER32_NAME_3 "fletcher32_3"
#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32"
#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2"
+#define DSET_OPTIONAL_SCALAR "dataset_with_scalar_space"
+#define DSET_OPTIONAL_VLEN "dataset_with_vlen_type"
#ifdef H5_HAVE_FILTER_SZIP
#define DSET_SZIP_NAME "szip"
#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32"
@@ -274,10 +277,16 @@ const char *FILENAME[] = {"dataset", /* 0 */
/* Shared global arrays */
#define DSET_DIM1 100
#define DSET_DIM2 200
-int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
-double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2];
-size_t count_nbytes_read = 0;
-size_t count_nbytes_written = 0;
+int ** points = NULL;
+int * points_data = NULL;
+double **points_dbl = NULL;
+double * points_dbl_data = NULL;
+int ** check = NULL;
+int * check_data = NULL;
+double **check_dbl = NULL;
+double * check_dbl_data = NULL;
+size_t count_nbytes_read = 0;
+size_t count_nbytes_written = 0;
/* Temporary buffer dimensions */
#define DSET_TMP_DIM1 50
@@ -366,13 +375,13 @@ test_create(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -441,13 +450,13 @@ test_create(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
/* Attempt to create a dataset with invalid chunk sizes */
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms,
@@ -463,7 +472,7 @@ test_create(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
dataset =
H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT);
@@ -485,11 +494,11 @@ test_create(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- assert(status >= 0);
+ HDassert(status >= 0);
dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms,
H5P_DEFAULT);
@@ -527,14 +536,24 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
void * tconv_buf = NULL;
int f = -1;
haddr_t offset;
- int rdata[DSET_DIM1][DSET_DIM2];
+ int ** rdata = NULL;
+ int * rdata_bytes = NULL;
TESTING("simple I/O");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
+ /* Set up data array */
+ if (NULL == (rdata_bytes = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (rdata = (int **)HDcalloc(DSET_DIM1, sizeof(rdata_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ rdata[i] = rdata_bytes + (i * DSET_DIM2);
+
/* Initialize the dataset */
for (i = n = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++)
@@ -552,7 +571,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
/* Create a small conversion buffer to test strip mining */
tconv_buf = HDmalloc((size_t)1000);
xfer = H5Pcreate(H5P_DATASET_XFER);
- assert(xfer >= 0);
+ HDassert(xfer >= 0);
if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0)
goto error;
@@ -569,7 +588,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
goto error;
/* Write the data to the dataset */
- if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, points) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, points_data) < 0)
goto error;
/* Test dataset address in file. Open the same file as a C file, seek
@@ -579,7 +598,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
goto error;
/* Read the dataset back */
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, check_data) < 0)
goto error;
/* Check that the values read are the same as the values written */
@@ -606,7 +625,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
f = HDopen(filename, O_RDONLY);
HDlseek(f, (off_t)offset, SEEK_SET);
- if (HDread(f, rdata, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
+ if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
/* Check that the values read are the same as the values written */
@@ -625,6 +644,9 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
f = -1;
HDfree(tconv_buf);
+ HDfree(rdata_bytes);
+ HDfree(rdata);
+
PASSED();
} /* end if */
else {
@@ -649,8 +671,11 @@ error:
TEST_ERROR
if (f > 0)
HDclose(f);
- if (tconv_buf)
- HDfree(tconv_buf);
+
+ HDfree(tconv_buf);
+ HDfree(rdata_bytes);
+ HDfree(rdata);
+
return FAIL;
} /* end test_simple_io() */
@@ -672,14 +697,24 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
hsize_t dims[2];
int f = -1;
haddr_t offset;
- int rdata[DSET_DIM1][DSET_DIM2];
+ int ** rdata = NULL;
+ int * rdata_bytes = NULL;
TESTING("dataset offset with user block");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
+ /* Set up data array */
+ if (NULL == (rdata_bytes = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (rdata = (int **)HDcalloc(DSET_DIM1, sizeof(rdata_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ rdata[i] = rdata_bytes + (i * DSET_DIM2);
+
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto error;
if (H5Pset_userblock(fcpl, (hsize_t)USER_BLOCK) < 0)
@@ -709,7 +744,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
space = -1;
/* Write the data to the dataset */
- if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0)
goto error;
/* Test dataset address in file. Open the same file as a C file, seek
@@ -727,7 +762,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
f = HDopen(filename, O_RDONLY);
HDlseek(f, (off_t)offset, SEEK_SET);
- if (HDread(f, rdata, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
+ if (HDread(f, rdata_bytes, sizeof(int) * DSET_DIM1 * DSET_DIM2) < 0)
goto error;
/* Check that the values read are the same as the values written */
@@ -745,6 +780,9 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
HDclose(f);
f = -1;
+ HDfree(rdata_bytes);
+ HDfree(rdata);
+
PASSED();
} /* end if */
else {
@@ -769,6 +807,10 @@ error:
TEST_ERROR
if (f > 0)
HDclose(f);
+
+ HDfree(rdata_bytes);
+ HDfree(rdata);
+
return FAIL;
} /* end test_userblock_offset() */
@@ -1902,7 +1944,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
*/
TESTING(" filters (uninitialized read)");
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
for (i = 0; i < (size_t)size[0]; i++) {
@@ -1930,7 +1972,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
}
- if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points_data) < 0)
TEST_ERROR;
if ((*dset_size = H5Dget_storage_size(dataset)) == 0)
@@ -1950,7 +1992,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
@@ -1959,7 +2001,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Callback decides to continue inspite data is corrupted. */
if (H5Pset_filter_callback(dxpl, filter_cb_cont, NULL) < 0)
TEST_ERROR;
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Callback decides to fail when data is corrupted. */
@@ -1968,14 +2010,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
TEST_ERROR;
}
else {
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -2009,7 +2051,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
points[i][j] = (int)HDrandom();
}
}
- if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points_data) < 0)
TEST_ERROR;
if (corrupted) {
@@ -2017,7 +2059,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
@@ -2026,7 +2068,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Callback decides to continue inspite data is corrupted. */
if (H5Pset_filter_callback(dxpl, filter_cb_cont, NULL) < 0)
TEST_ERROR;
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Callback decides to fail when data is corrupted. */
@@ -2035,7 +2077,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
@@ -2043,7 +2085,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
else {
/* Read the dataset back and check it */
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -2081,7 +2123,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
@@ -2090,7 +2132,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Callback decides to continue inspite data is corrupted. */
if (H5Pset_filter_callback(dxpl, filter_cb_cont, NULL) < 0)
TEST_ERROR;
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Callback decides to fail when data is corrupted. */
@@ -2100,14 +2142,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
TEST_ERROR;
} /* end if */
else {
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -2140,7 +2182,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TEST_ERROR;
/* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing)
*/
- if (H5Dwrite(dataset, H5T_NATIVE_INT, sid, sid, dxpl, points) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, sid, sid, dxpl, points_data) < 0)
TEST_ERROR;
if (corrupted) {
@@ -2148,7 +2190,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
@@ -2157,7 +2199,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Callback decides to continue inspite data is corrupted. */
if (H5Pset_filter_callback(dxpl, filter_cb_cont, NULL) < 0)
TEST_ERROR;
- if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check_data) < 0)
TEST_ERROR;
/* Callback decides to fail when data is corrupted. */
@@ -2166,14 +2208,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY
{
- status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check_data);
}
H5E_END_TRY;
if (status >= 0)
TEST_ERROR;
}
else {
- if (H5Dread(dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, sid, sid, dxpl, check_data) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -2877,7 +2919,7 @@ test_missing_filter(hid_t file)
} /* end if */
/* Write data */
- if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
+ if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
@@ -2907,7 +2949,7 @@ test_missing_filter(hid_t file)
} /* end if */
/* Read data */
- if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
+ if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
@@ -2968,7 +3010,7 @@ test_missing_filter(hid_t file)
/* Read data (should fail, since deflate filter is missing) */
H5E_BEGIN_TRY
{
- ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check);
+ ret = H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data);
}
H5E_END_TRY;
if (ret >= 0) {
@@ -3186,7 +3228,7 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long long >= size of int */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0f, (double)(precision - 1));
+ power = HDpow(2.0, (double)(precision - 1));
orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
/* even-numbered values are negtive */
@@ -3340,7 +3382,7 @@ test_nbit_float(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (!(orig_data[i][j] == orig_data[i][j]))
+ if (HDisnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_FLT_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3391,11 +3433,11 @@ test_nbit_double(hid_t file)
/* orig_data[] are initialized to be within the range that can be represented by
* dataset datatype (no precision loss during datatype conversion)
*/
- double orig_data[2][5] = {
- {H5_DOUBLE(1.6081706885101836e+60), H5_DOUBLE(-255.32099170994480), H5_DOUBLE(1.2677579992621376e-61),
- H5_DOUBLE(64568.289448797700), H5_DOUBLE(-1.0619721778839084e-75)},
- {H5_DOUBLE(2.1499497833454840e+56), H5_DOUBLE(6.6562295504670740e-3), H5_DOUBLE(-1.5747263393432150),
- H5_DOUBLE(1.0711093225222612), H5_DOUBLE(-9.8971679387636870e-1)}};
+ double orig_data[2][5] = {{(double)1.6081706885101836e+60L, -255.32099170994480f,
+ (double)1.2677579992621376e-61L, 64568.289448797700f,
+ (double)-1.0619721778839084e-75L},
+ {(double)2.1499497833454840e+56L, 6.6562295504670740e-3f, -1.5747263393432150f,
+ 1.0711093225222612f, -9.8971679387636870e-1f}};
double new_data[2][5];
size_t precision, offset;
size_t i, j;
@@ -3462,7 +3504,7 @@ test_nbit_double(hid_t file)
*/
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (!(orig_data[i][j] == orig_data[i][j]))
+ if (HDisnan(orig_data[i][j]))
continue; /* skip if value is NaN */
if (!H5_DBL_ABS_EQUAL(new_data[i][j], orig_data[i][j])) {
H5_FAILED();
@@ -3563,7 +3605,7 @@ test_nbit_array(hid_t file)
for (j = 0; j < (size_t)size[1]; j++)
for (m = 0; m < (size_t)adims[0]; m++)
for (n = 0; n < (size_t)adims[1]; n++) {
- power = HDpow(2.0F, (double)precision);
+ power = HDpow(2.0, (double)precision);
orig_data[i][j][m][n] =
(unsigned int)(((long long)HDrandom() % (long long)power) << offset);
} /* end for */
@@ -3759,11 +3801,11 @@ test_nbit_compound(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
+ power = HDpow(2.0, (double)(precision[2] - 1));
orig_data[i][j].s = (short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].f = float_val[i][j];
@@ -3808,8 +3850,7 @@ test_nbit_compound(hid_t file)
if (((unsigned)new_data[i][j].i & i_mask) != ((unsigned)orig_data[i][j].i & i_mask) ||
((unsigned)new_data[i][j].c & c_mask) != ((unsigned)orig_data[i][j].c & c_mask) ||
((unsigned)new_data[i][j].s & s_mask) != ((unsigned)orig_data[i][j].s & s_mask) ||
- (orig_data[i][j].f == orig_data[i][j].f &&
- !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
+ (!HDisnan(orig_data[i][j].f) && !H5_FLT_ABS_EQUAL(new_data[i][j].f, orig_data[i][j].f))) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -4042,32 +4083,32 @@ test_nbit_compound_2(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].a.i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
- orig_data[i][j].a.s = (short)(-((long long)HDrandom() % (long long)power) << offset[2]);
+ power = HDpow(2.0, (double)(precision[2] - 1));
+ orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];
- power = HDpow(2.0F, (double)precision[3]);
+ power = HDpow(2.0, (double)precision[3]);
orig_data[i][j].v = (unsigned int)(((long long)HDrandom() % (long long)power) << offset[3]);
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0F, (double)(precision[4] - 1));
+ power = HDpow(2.0, (double)(precision[4] - 1));
orig_data[i][j].b[m][n] = (char)(((long long)HDrandom() % (long long)power) << offset[4]);
} /* end for */
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
- (int)(-((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ (int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
+ power = HDpow(2.0, (double)(precision[2] - 1));
orig_data[i][j].d[m][n].s =
(short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].d[m][n].f = float_val[i][j];
@@ -4136,7 +4177,7 @@ test_nbit_compound_2(hid_t file)
((unsigned)orig_data[i][j].d[m][n].c & c_mask) ||
((unsigned)new_data[i][j].d[m][n].s & s_mask) !=
((unsigned)orig_data[i][j].d[m][n].s & s_mask) ||
- (new_data[i][j].d[m][n].f == new_data[i][j].d[m][n].f &&
+ (!HDisnan(new_data[i][j].d[m][n].f) &&
!H5_FLT_ABS_EQUAL(new_data[i][j].d[m][n].f, new_data[i][j].d[m][n].f))) {
d_failed = 1;
goto out;
@@ -4146,8 +4187,7 @@ out:
if (((unsigned)new_data[i][j].a.i & i_mask) != ((unsigned)orig_data[i][j].a.i & i_mask) ||
((unsigned)new_data[i][j].a.c & c_mask) != ((unsigned)orig_data[i][j].a.c & c_mask) ||
((unsigned)new_data[i][j].a.s & s_mask) != ((unsigned)orig_data[i][j].a.s & s_mask) ||
- (new_data[i][j].a.f == new_data[i][j].a.f &&
- !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
+ (!HDisnan(new_data[i][j].a.f) && !H5_FLT_ABS_EQUAL(new_data[i][j].a.f, new_data[i][j].a.f)) ||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
@@ -4299,7 +4339,7 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
- power = HDpow(2.0F, 17.0F - 1.0F);
+ power = HDpow(2.0, 17.0 - 1.0);
HDmemset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
HDstrcpy(orig_data[i].str, "fixed-length C string");
@@ -4343,9 +4383,9 @@ test_nbit_compound_3(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
- if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 ||
- strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len ||
- new_data[i].r != orig_data[i].r) {
+ if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 ||
+ HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
+ new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu\n", (unsigned long)i);
@@ -4426,62 +4466,71 @@ test_nbit_int_size(hid_t file)
hid_t dataspace, dataset, datatype, mem_datatype, dset_create_props;
hsize_t dims[2], chunk_size[2];
hsize_t dset_size = 0;
- int orig_data[DSET_DIM1][DSET_DIM2];
+ int ** orig = NULL;
+ int * orig_data = NULL;
double power;
int i, j;
size_t precision, offset;
TESTING(" nbit integer dataset size");
+ /* Set up data array */
+ if (NULL == (orig_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (orig = (int **)HDcalloc(DSET_DIM1, sizeof(orig_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ orig[i] = orig_data + (i * DSET_DIM2);
+
/* Define dataset datatype (integer), and set precision, offset */
if ((datatype = H5Tcopy(H5T_NATIVE_INT)) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Tcopy failed\n", __LINE__);
goto error;
- } /* end if */
+ }
precision = 16; /* precision includes sign bit */
if (H5Tset_precision(datatype, precision) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Pset_precision failed\n", __LINE__);
goto error;
- } /* end if */
+ }
offset = 8;
if (H5Tset_offset(datatype, offset) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Tset_offset failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/* Copy to memory datatype */
if ((mem_datatype = H5Tcopy(datatype)) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Tcopy failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/* Set order of dataset datatype */
if (H5Tset_order(datatype, H5T_ORDER_BE) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Pset_order failed\n", __LINE__);
goto error;
- } /* end if */
+ }
if (H5Tset_size(datatype, 4) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Pset_size failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/* Initiliaze data buffer with random data within correct range
* corresponding to the memory datatype's precision and offset.
*/
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
- power = HDpow(2.0F, (double)(precision - 1));
- orig_data[i][j] = HDrandom() % (int)power << offset;
- } /* end for */
+ power = HDpow(2.0, (double)(precision - 1));
+ orig[i][j] = HDrandom() % (int)power << offset;
+ }
/* Describe the dataspace. */
dims[0] = DSET_DIM1;
@@ -4490,7 +4539,7 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/*
* Set the dataset creation property list to specify the chunks
@@ -4501,13 +4550,13 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" line %d: H5Pcreate failed\n", __LINE__);
goto error;
- } /* end if */
+ }
if (H5Pset_chunk(dset_create_props, 2, chunk_size) < 0) {
H5_FAILED();
HDprintf(" line %d: H5Pset_chunk failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/*
* Set for n-bit compression
@@ -4516,7 +4565,7 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" line %d: H5Pset_nbit failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/*
* Create a new dataset within the file.
@@ -4526,7 +4575,7 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" line %d: H5dwrite failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/*
* Write the array to the file.
@@ -4535,7 +4584,7 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" Line %d: H5Dwrite failed\n", __LINE__);
goto error;
- } /* end if */
+ }
/*
* Get the precision of the data type
@@ -4544,7 +4593,7 @@ test_nbit_int_size(hid_t file)
H5_FAILED();
HDprintf(" Line %d: wrong precision size: %zu\n", __LINE__, precision);
goto error;
- } /* end if */
+ }
/*
* The size of the dataset after compression should around 2 * DSET_DIM1 * DSET_DIM2
@@ -4552,9 +4601,9 @@ test_nbit_int_size(hid_t file)
if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) ||
dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size);
+ HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
goto error;
- } /* end if */
+ }
H5Tclose(datatype);
H5Tclose(mem_datatype);
@@ -4562,10 +4611,17 @@ test_nbit_int_size(hid_t file)
H5Sclose(dataspace);
H5Pclose(dset_create_props);
+ HDfree(orig);
+ HDfree(orig_data);
+
PASSED();
return SUCCEED;
+
error:
+ HDfree(orig);
+ HDfree(orig_data);
+
return FAIL;
} /* end test_nbit_int_size() */
@@ -4590,13 +4646,22 @@ test_nbit_flt_size(hid_t file)
hid_t dataspace, dataset, datatype, dset_create_props;
hsize_t dims[2], chunk_size[2];
hsize_t dset_size = 0;
- float orig_data[DSET_DIM1][DSET_DIM2];
+ float **orig = NULL;
+ float * orig_data = NULL;
int i, j;
size_t precision, offset;
size_t spos, epos, esize, mpos, msize;
TESTING(" nbit floating-number dataset size");
+ /* Set up data array */
+ if (NULL == (orig_data = (float *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(float))))
+ TEST_ERROR;
+ if (NULL == (orig = (float **)HDcalloc(DSET_DIM1, sizeof(orig_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ orig[i] = orig_data + (i * DSET_DIM2);
+
/* Define floating-point type for dataset
*-------------------------------------------------------------------
* size=4 byte, precision=16 bits, offset=8 bits,
@@ -4675,7 +4740,7 @@ test_nbit_flt_size(hid_t file)
*/
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++)
- orig_data[i][j] = (float)(HDrandom() % 1234567) / 2;
+ orig[i][j] = (float)(HDrandom() % 1234567) / 2;
/* Describe the dataspace. */
dims[0] = DSET_DIM1;
@@ -4746,7 +4811,7 @@ test_nbit_flt_size(hid_t file)
if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) ||
dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) {
H5_FAILED();
- HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size);
+ HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size);
goto error;
} /* end if */
@@ -4757,8 +4822,14 @@ test_nbit_flt_size(hid_t file)
PASSED();
+ HDfree(orig);
+ HDfree(orig_data);
+
return SUCCEED;
error:
+ HDfree(orig);
+ HDfree(orig_data);
+
return FAIL;
} /* end test_nbit_flt_size() */
@@ -5121,7 +5192,7 @@ test_scaleoffset_float(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0F, -3.0F)) {
+ if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -3.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5267,7 +5338,7 @@ test_scaleoffset_float_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0F, -3.0F)) {
+ if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0, -3.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5388,7 +5459,7 @@ test_scaleoffset_double(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0F, -7.0F)) {
+ if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -7.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5534,7 +5605,7 @@ test_scaleoffset_double_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0F, -7.0F)) {
+ if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0, -7.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5859,7 +5930,7 @@ test_can_apply(hid_t file)
} /* end if */
/* Write data */
- if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
+ if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
@@ -5887,7 +5958,7 @@ test_can_apply(hid_t file)
} /* end if */
/* Read data */
- if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
+ if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
@@ -6015,7 +6086,7 @@ test_can_apply2(hid_t file)
} /* end if */
/* Write data */
- if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
+ if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
@@ -6043,7 +6114,7 @@ test_can_apply2(hid_t file)
} /* end if */
/* Read data */
- if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
+ if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
@@ -6093,6 +6164,115 @@ error:
} /* end test_can_apply2() */
/*-------------------------------------------------------------------------
+ * Function: test_optional_filters
+ *
+ * Purpose: Tests that H5Dcreate2 will not fail when a combination of
+ * type, space, etc... doesn't work for a filter and filter is
+ * optional.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Binh-Minh Ribler
+ * 24 July 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_optional_filters(hid_t file)
+{
+ unsigned int level = 9;
+ unsigned int cd_values[1] = {level};
+ size_t cd_nelmts = 1;
+ hsize_t dim1d[1]; /* Dataspace dimensions */
+ hid_t dsid = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t strtid = H5I_INVALID_HID; /* Datatype ID for string */
+ hid_t vlentid = H5I_INVALID_HID; /* Datatype ID for vlen */
+ hid_t dcplid = H5I_INVALID_HID; /* Dataspace creation property list ID */
+
+ TESTING("dataset with optional filters");
+
+ /* Create dcpl with special filter */
+ if ((dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+
+ /* Create the datatype */
+ if ((strtid = H5Tcreate(H5T_STRING, H5T_VARIABLE)) < 0)
+ TEST_ERROR;
+
+ /* Create the data space */
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
+ TEST_ERROR;
+
+ /* The filter is optional. */
+ if (H5Pset_filter(dcplid, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, cd_nelmts, cd_values) < 0)
+ TEST_ERROR;
+
+ /* Create dataset with optional filter */
+ if ((dsid = H5Dcreate2(file, DSET_OPTIONAL_SCALAR, strtid, sid, H5P_DEFAULT, dcplid, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Close dataset */
+ if (H5Dclose(dsid) < 0)
+ TEST_ERROR;
+
+ /* Close dataspace */
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ /* Close datatype */
+ if (H5Tclose(strtid) < 0)
+ TEST_ERROR;
+
+ /* Set dataspace dimensions */
+ dim1d[0] = DIM1;
+
+ /* Create a non-scalar dataspace */
+ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Create a vlen datatype */
+ if ((vlentid = H5Tvlen_create(H5T_NATIVE_INT)) < 0)
+ TEST_ERROR;
+
+ /* Create dataset with optional filter */
+ if ((dsid = H5Dcreate2(file, DSET_OPTIONAL_VLEN, vlentid, sid, H5P_DEFAULT, dcplid, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Close dataset */
+ if (H5Dclose(dsid) < 0)
+ TEST_ERROR;
+
+ /* Close dataspace */
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ /* Close datatype */
+ if (H5Tclose(vlentid) < 0)
+ TEST_ERROR;
+
+ /* Close dataset creation property list */
+ if (H5Pclose(dcplid) < 0)
+ TEST_ERROR;
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(dsid);
+ H5Sclose(sid);
+ H5Pclose(dcplid);
+ H5Tclose(strtid);
+ H5Tclose(vlentid);
+ }
+ H5E_END_TRY;
+ return FAIL;
+} /* end test_optional_filters() */
+
+/*-------------------------------------------------------------------------
* Function: test_can_apply_szip
*
* Purpose: Tests library behavior when szip filter indicates it can't
@@ -6340,7 +6520,7 @@ test_set_local(hid_t fapl)
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
points[i][j] = (int)n++;
- points_dbl[i][j] = (double)1.5F * n++;
+ points_dbl[i][j] = 1.5 * n++;
}
/* Open file */
@@ -6388,7 +6568,7 @@ test_set_local(hid_t fapl)
} /* end if */
/* Write data */
- if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0) {
+ if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
@@ -6411,7 +6591,7 @@ test_set_local(hid_t fapl)
} /* end if */
/* Write data */
- if (H5Dwrite(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_dbl) < 0) {
+ if (H5Dwrite(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, points_dbl_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error writing dataset data\n", __LINE__);
goto error;
@@ -6474,7 +6654,7 @@ test_set_local(hid_t fapl)
} /* end if */
/* Read data */
- if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) {
+ if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
@@ -6524,7 +6704,7 @@ test_set_local(hid_t fapl)
} /* end if */
/* Read data */
- if (H5Dread(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_dbl) < 0) {
+ if (H5Dread(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, check_dbl_data) < 0) {
H5_FAILED();
HDprintf(" Line %d: Error reading dataset data\n", __LINE__);
goto error;
@@ -6536,7 +6716,7 @@ test_set_local(hid_t fapl)
for (j = 0; j < dims[1]; j++) {
/* If the difference between two values is greater than 0.001%, they're
* considered not equal. */
- if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], (double)0.00001F)) {
+ if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], 0.00001)) {
H5_FAILED();
HDprintf(" Line %d: Read different values than written.\n", __LINE__);
HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
@@ -6849,6 +7029,7 @@ error:
static herr_t
test_filter_delete(hid_t file)
{
+#ifdef H5_HAVE_FILTER_DEFLATE
H5Z_filter_t filtn; /* filter identification number */
hid_t dsid = -1; /* dataset ID */
hid_t sid = -1; /* dataspace ID */
@@ -6860,6 +7041,7 @@ test_filter_delete(hid_t file)
unsigned flags; /* flags for filter */
herr_t ret; /* generic return value */
int i;
+#endif
TESTING("filter deletion");
@@ -6964,9 +7146,7 @@ test_filter_delete(hid_t file)
goto error;
PASSED();
-#else
- SKIPPED();
-#endif
+
return SUCCEED;
error:
@@ -6979,6 +7159,10 @@ error:
}
H5E_END_TRY;
return FAIL;
+#else
+ SKIPPED();
+ return SUCCEED;
+#endif
} /* end test_filter_delete() */
/*-------------------------------------------------------------------------
@@ -7377,8 +7561,12 @@ test_missing_chunk(hid_t file)
hsize_t hs_start2[2], hs_stride2[2], hs_count2[2], hs_block2[2]; /* Hyperslab setting */
/* Buffers for reading/writing dataset */
- int wdata[MISSING_CHUNK_DIM], rdata[MISSING_CHUNK_DIM];
- int wdata2[MISSING_CHUNK_DIM][MISSING_CHUNK_DIM], rdata2[MISSING_CHUNK_DIM][MISSING_CHUNK_DIM];
+ int * wdata = NULL;
+ int * rdata = NULL;
+ int **wdata2 = NULL;
+ int **rdata2 = NULL;
+ int * wdata2_bytes = NULL;
+ int * rdata2_bytes = NULL;
/* Setting for 1-D dataset */
hsize_t dsize = 100, dmax = H5S_UNLIMITED;
@@ -7395,6 +7583,26 @@ test_missing_chunk(hid_t file)
TESTING("Read dataset with unwritten chunk & undefined fill value");
+ /* Set up data arrays */
+ if (NULL == (wdata = (int *)HDcalloc(MISSING_CHUNK_DIM, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (rdata = (int *)HDcalloc(MISSING_CHUNK_DIM, sizeof(int))))
+ TEST_ERROR;
+
+ if (NULL == (wdata2_bytes = (int *)HDcalloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (wdata2 = (int **)HDcalloc(MISSING_CHUNK_DIM, sizeof(wdata2_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < MISSING_CHUNK_DIM; i++)
+ wdata2[i] = wdata2_bytes + (i * MISSING_CHUNK_DIM);
+
+ if (NULL == (rdata2_bytes = (int *)HDcalloc(MISSING_CHUNK_DIM * MISSING_CHUNK_DIM, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (rdata2 = (int **)HDcalloc(MISSING_CHUNK_DIM, sizeof(rdata2_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < MISSING_CHUNK_DIM; i++)
+ rdata2[i] = rdata2_bytes + (i * MISSING_CHUNK_DIM);
+
/* Get the file's file access property list */
if ((fapl = H5Fget_access_plist(file)) < 0)
TEST_ERROR;
@@ -7491,13 +7699,13 @@ test_missing_chunk(hid_t file)
/* Write selected data to the datasets */
if (H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, wdata) < 0)
TEST_ERROR;
- if (H5Dwrite(did2, H5T_NATIVE_INT, sid2, sid2, H5P_DEFAULT, wdata2) < 0)
+ if (H5Dwrite(did2, H5T_NATIVE_INT, sid2, sid2, H5P_DEFAULT, wdata2_bytes) < 0)
TEST_ERROR;
/* Read all data from the datasets */
if (H5Dread(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
TEST_ERROR;
- if (H5Dread(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata2) < 0)
+ if (H5Dread(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata2_bytes) < 0)
TEST_ERROR;
/* Validata values read for the 1-D dataset */
@@ -7553,6 +7761,13 @@ test_missing_chunk(hid_t file)
if (H5Dclose(did2) < 0)
TEST_ERROR;
+ HDfree(rdata);
+ HDfree(wdata);
+ HDfree(rdata2);
+ HDfree(wdata2);
+ HDfree(rdata2_bytes);
+ HDfree(wdata2_bytes);
+
PASSED();
return SUCCEED;
@@ -7569,6 +7784,14 @@ error:
H5Sclose(sid2);
}
H5E_END_TRY;
+
+ HDfree(rdata);
+ HDfree(wdata);
+ HDfree(rdata2);
+ HDfree(wdata2);
+ HDfree(rdata2_bytes);
+ HDfree(wdata2_bytes);
+
return FAIL;
} /* end test_missing_chunk() */
@@ -7580,12 +7803,12 @@ error:
*
* If either argument is zero, then the result is undefined.
*/
-static long
-gcd(const long l0, const long r0)
+static H5_ATTR_CONST long
+gcd(long l0, long r0)
{
long magnitude, remainder;
bool negative = ((l0 < 0) != (r0 < 0));
- long l = labs(l0), r = labs(r0);
+ long l = HDlabs(l0), r = HDlabs(r0);
do {
if (l < r) {
@@ -7675,7 +7898,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
TESTING(testname);
- assert(NPOINTS < 100);
+ HDassert(NPOINTS < 100);
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
@@ -8197,13 +8420,13 @@ test_deprec(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -8262,7 +8485,7 @@ test_deprec(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
/* Add the deflate filter, if available */
#if defined H5_HAVE_FILTER_DEFLATE
@@ -8298,7 +8521,7 @@ test_deprec(hid_t file)
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms);
@@ -8313,7 +8536,7 @@ test_deprec(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0)
goto error;
@@ -8338,11 +8561,11 @@ test_deprec(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- assert(status >= 0);
+ HDassert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) <
0)
@@ -8580,7 +8803,7 @@ test_chunk_cache(hid_t fapl)
/* Set new rdcc settings on fapl */
nslots_2 = nslots_1 * 2;
nbytes_2 = nbytes_1 * 2;
- w0_2 = w0_1 / (double)2.0F;
+ w0_2 = w0_1 / 2.0;
if (H5Pset_cache(fapl_local, 0, nslots_2, nbytes_2, w0_2) < 0)
FAIL_STACK_ERROR
@@ -8802,9 +9025,13 @@ test_big_chunks_bypass_cache(hid_t fapl)
hsize_t t_count[2], t_stride[2], t_offset[2], t_block[2]; /* Setting for hyperslab (2-D) */
/* Buffers for reading and writing data (1-D) */
int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL;
- /* Buffer for reading and writing data (2-D) */
- static int t_wdata[BYPASS_CHUNK_DIM / 2][BYPASS_CHUNK_DIM / 2], t_rdata1[BYPASS_DIM][BYPASS_DIM],
- t_rdata2[BYPASS_CHUNK_DIM / 2][BYPASS_CHUNK_DIM / 2];
+ /* Buffers for reading and writing data (2-D) */
+ int ** t_wdata = NULL;
+ int ** t_rdata1 = NULL;
+ int ** t_rdata2 = NULL;
+ int * t_wdata_bytes = NULL;
+ int * t_rdata1_bytes = NULL;
+ int * t_rdata2_bytes = NULL;
int i, j; /* Local index variables */
H5F_libver_t low; /* File format low bound */
H5D_chunk_index_t idx_type, t_idx_type; /* Dataset chunk index types */
@@ -8813,6 +9040,30 @@ test_big_chunks_bypass_cache(hid_t fapl)
h5_fixname(FILENAME[9], fapl, filename, sizeof filename);
+ /* Set up data arrays */
+ if (NULL ==
+ (t_wdata_bytes = (int *)HDcalloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (t_wdata = (int **)HDcalloc((BYPASS_CHUNK_DIM / 2), sizeof(t_wdata_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < (BYPASS_CHUNK_DIM / 2); i++)
+ t_wdata[i] = t_wdata_bytes + (i * (BYPASS_CHUNK_DIM / 2));
+
+ if (NULL == (t_rdata1_bytes = (int *)HDcalloc(BYPASS_DIM * BYPASS_DIM, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (t_rdata1 = (int **)HDcalloc(BYPASS_DIM, sizeof(t_rdata1_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < BYPASS_DIM; i++)
+ t_rdata1[i] = t_rdata1_bytes + (i * BYPASS_DIM);
+
+ if (NULL ==
+ (t_rdata2_bytes = (int *)HDcalloc((BYPASS_CHUNK_DIM / 2) * (BYPASS_CHUNK_DIM / 2), sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (t_rdata2 = (int **)HDcalloc((BYPASS_CHUNK_DIM / 2), sizeof(t_rdata2_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < (BYPASS_CHUNK_DIM / 2); i++)
+ t_rdata2[i] = t_rdata2_bytes + (i * (BYPASS_CHUNK_DIM / 2));
+
/* Check if we are using the latest version of the format */
if (H5Pget_libver_bounds(fapl, &low, NULL) < 0)
FAIL_STACK_ERROR
@@ -8935,7 +9186,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* This write should go through the cache because fill value is used. */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, wdata) < 0)
FAIL_STACK_ERROR
- if (H5Dwrite(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_wdata) < 0)
+ if (H5Dwrite(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_wdata_bytes) < 0)
FAIL_STACK_ERROR
/* Close the first 1-D & 2-D datasets */
@@ -8954,7 +9205,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
* chunk is bigger than the cache size and it isn't allocated on disk. */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata1) < 0)
FAIL_STACK_ERROR
- if (H5Dread(t_dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rdata1) < 0)
+ if (H5Dread(t_dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rdata1_bytes) < 0)
FAIL_STACK_ERROR
/* Verify data for the first 1-D dataset */
@@ -9017,7 +9268,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Write to the second 1-D & 2-D dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, wdata) < 0)
FAIL_STACK_ERROR
- if (H5Dwrite(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_wdata) < 0)
+ if (H5Dwrite(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_wdata_bytes) < 0)
FAIL_STACK_ERROR
/* Close the second 1-D & 2-D dataset */
@@ -9037,7 +9288,7 @@ test_big_chunks_bypass_cache(hid_t fapl)
* the cache size. */
if (H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0)
FAIL_STACK_ERROR
- if (H5Dread(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_rdata2) < 0)
+ if (H5Dread(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_rdata2_bytes) < 0)
FAIL_STACK_ERROR
/* Verify data for the second 1-D dataset */
@@ -9081,6 +9332,12 @@ test_big_chunks_bypass_cache(hid_t fapl)
HDfree(wdata);
HDfree(rdata1);
HDfree(rdata2);
+ HDfree(t_wdata);
+ HDfree(t_rdata1);
+ HDfree(t_rdata2);
+ HDfree(t_wdata_bytes);
+ HDfree(t_rdata1_bytes);
+ HDfree(t_rdata2_bytes);
PASSED();
return SUCCEED;
@@ -9098,12 +9355,17 @@ error:
H5Fclose(fid);
}
H5E_END_TRY;
- if (wdata)
- HDfree(wdata);
- if (rdata1)
- HDfree(rdata1);
- if (rdata2)
- HDfree(rdata2);
+
+ HDfree(wdata);
+ HDfree(rdata1);
+ HDfree(rdata2);
+ HDfree(t_wdata);
+ HDfree(t_rdata1);
+ HDfree(t_rdata2);
+ HDfree(t_wdata_bytes);
+ HDfree(t_rdata1_bytes);
+ HDfree(t_rdata2_bytes);
+
return FAIL;
} /* end test_big_chunks_bypass_cache() */
@@ -9263,8 +9525,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
npoints = (hsize_t)snpoints;
/* Compute the "down" dimension values */
- if (H5VM_array_down(ndims, dim, down) < 0)
- FAIL_STACK_ERROR
+ H5VM_array_down(ndims, dim, down);
/* Create chunked dataset */
if ((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl,
@@ -9446,8 +9707,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
H5VM_swizzle_coords(hsize_t, swizzled_dim, unlim_dim);
/* Compute the "down" dimension values */
- if (H5VM_array_down(ndims, swizzled_dim, down) < 0)
- FAIL_STACK_ERROR
+ H5VM_array_down(ndims, swizzled_dim, down);
/* Read elements */
for (u = 0; u < npoints; u++) {
@@ -9689,13 +9949,33 @@ test_chunk_fast_bug1(hid_t fapl)
hid_t dsid = -1; /* Dataset ID */
hsize_t dim[2], max_dim[2], chunk_dim[2]; /* Dataset and chunk dimensions */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
- static unsigned wbuf[40][20], rbuf[40][20]; /* Element written/read */
- unsigned i, j; /* Local index variables */
+
+ unsigned **wbuf = NULL;
+ unsigned **rbuf = NULL;
+ unsigned * wbuf_bytes = NULL;
+ unsigned * rbuf_bytes = NULL;
+
+ unsigned i, j; /* Local index variables */
TESTING("datasets w/extensible array chunk indexing bug");
h5_fixname(FILENAME[10], fapl, filename, sizeof filename);
+ /* Set up data array */
+ if (NULL == (wbuf_bytes = (unsigned *)HDcalloc(40 * 20, sizeof(unsigned))))
+ TEST_ERROR;
+ if (NULL == (wbuf = (unsigned **)HDcalloc(40, sizeof(wbuf_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < 40; i++)
+ wbuf[i] = wbuf_bytes + (i * 20);
+
+ if (NULL == (rbuf_bytes = (unsigned *)HDcalloc(40 * 20, sizeof(unsigned))))
+ TEST_ERROR;
+ if (NULL == (rbuf = (unsigned **)HDcalloc(40, sizeof(rbuf_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < 40; i++)
+ rbuf[i] = rbuf_bytes + (i * 20);
+
/* Initialize write buffer */
for (i = 0; i < 40; i++)
for (j = 0; j < 20; j++)
@@ -9734,7 +10014,7 @@ test_chunk_fast_bug1(hid_t fapl)
FAIL_STACK_ERROR
/* Write buffer to dataset */
- if (H5Dwrite(dsid, H5T_NATIVE_UINT, sid, sid, H5P_DEFAULT, &wbuf) < 0)
+ if (H5Dwrite(dsid, H5T_NATIVE_UINT, sid, sid, H5P_DEFAULT, wbuf_bytes) < 0)
FAIL_STACK_ERROR
/* Close everything */
@@ -9746,7 +10026,7 @@ test_chunk_fast_bug1(hid_t fapl)
FAIL_STACK_ERROR
/* Read from dataset */
- if (H5Dread(dsid, H5T_NATIVE_UINT, sid, sid, H5P_DEFAULT, &rbuf) < 0)
+ if (H5Dread(dsid, H5T_NATIVE_UINT, sid, sid, H5P_DEFAULT, rbuf_bytes) < 0)
FAIL_STACK_ERROR
/* Verify read data */
@@ -9767,6 +10047,11 @@ test_chunk_fast_bug1(hid_t fapl)
if (H5Sclose(sid) < 0)
FAIL_STACK_ERROR
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(wbuf_bytes);
+ HDfree(rbuf_bytes);
+
PASSED();
return SUCCEED;
@@ -9779,6 +10064,12 @@ error:
H5Fclose(fid);
}
H5E_END_TRY;
+
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(wbuf_bytes);
+ HDfree(rbuf_bytes);
+
return FAIL;
} /* end test_chunk_fast_bug1() */
@@ -10433,13 +10724,19 @@ test_fixed_array(hid_t fapl)
int *rbuf_big = NULL; /* read buffer for big dataset */
const hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */
- int chunks[12][6]; /* # of chunks for dataset dimensions */
- int chunks_big[125][20]; /* # of chunks for big dataset dimensions */
- int chunk_row; /* chunk row index */
- int chunk_col; /* chunk column index */
- hsize_t coord[POINTS][2]; /* datdaset coordinates */
- hsize_t coord_big[POINTS_BIG][2]; /* big dataset coordinates */
+ int **chunks = NULL; /* # of chunks for dataset dimensions */
+ int **chunks_big = NULL; /* # of chunks for big dataset dimensions */
+ int * chunks_bytes = NULL;
+ int * chunks_big_bytes = NULL;
+
+ int chunk_row; /* chunk row index */
+ int chunk_col; /* chunk column index */
+
+ hsize_t **coord = NULL; /* datdaset coordinates */
+ hsize_t **coord_big = NULL; /* big datdaset coordinates */
+ hsize_t * coord_bytes = NULL;
+ hsize_t * coord_big_bytes = NULL;
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
H5F_libver_t low, high; /* File format bounds */
@@ -10462,6 +10759,35 @@ test_fixed_array(hid_t fapl)
h5_fixname(FILENAME[12], fapl, filename, sizeof filename);
+ /* Set up 2D data arrays */
+ if (NULL == (chunks_bytes = (int *)HDcalloc(12 * 6, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (chunks = (int **)HDcalloc(12, sizeof(chunks_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < 12; i++)
+ chunks[i] = chunks_bytes + (i * 6);
+
+ if (NULL == (chunks_big_bytes = (int *)HDcalloc(125 * 20, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (chunks_big = (int **)HDcalloc(125, sizeof(chunks_big_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < 125; i++)
+ chunks_big[i] = chunks_big_bytes + (i * 20);
+
+ if (NULL == (coord_bytes = (hsize_t *)HDcalloc(POINTS * 2, sizeof(hsize_t))))
+ TEST_ERROR;
+ if (NULL == (coord = (hsize_t **)HDcalloc(POINTS, sizeof(coord_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < POINTS; i++)
+ coord[i] = coord_bytes + (i * 2);
+
+ if (NULL == (coord_big_bytes = (hsize_t *)HDcalloc(POINTS_BIG * 2, sizeof(hsize_t))))
+ TEST_ERROR;
+ if (NULL == (coord_big = (hsize_t **)HDcalloc(POINTS_BIG, sizeof(coord_big_bytes))))
+ TEST_ERROR;
+ for (i = 0; i < POINTS_BIG; i++)
+ coord_big[i] = coord_big_bytes + (i * 2);
+
/* Check if we are using the latest version of the format */
if (H5Pget_libver_bounds(fapl, &low, &high) < 0)
FAIL_STACK_ERROR
@@ -10572,7 +10898,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for writing */
- if (H5Sselect_elements(sid_max, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ if (H5Sselect_elements(sid_max, H5S_SELECT_SET, POINTS, (const hsize_t *)coord_bytes) < 0)
TEST_ERROR;
/* Write into dataset */
@@ -10621,7 +10947,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for writing */
- if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord_bytes) < 0)
TEST_ERROR;
/* Write into dataset */
@@ -10692,7 +11018,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for writing */
- if (H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0)
+ if (H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big_bytes) < 0)
TEST_ERROR;
/* Write into dataset */
@@ -10722,7 +11048,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for reading */
- if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord_bytes) < 0)
TEST_ERROR;
/* Read from dataset */
@@ -10758,7 +11084,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for reading */
- if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ if (H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord_bytes) < 0)
TEST_ERROR;
/* Read from dataset */
@@ -10793,7 +11119,7 @@ test_fixed_array(hid_t fapl)
TEST_ERROR;
/* Select the random points for reading */
- if (H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0)
+ if (H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big_bytes) < 0)
TEST_ERROR;
/* Read from dataset */
if (H5Dread(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, rbuf_big) < 0)
@@ -10844,6 +11170,15 @@ test_fixed_array(hid_t fapl)
HDfree(wbuf_big);
HDfree(rbuf_big);
+ HDfree(chunks);
+ HDfree(chunks_big);
+ HDfree(coord);
+ HDfree(coord_big);
+ HDfree(chunks_bytes);
+ HDfree(chunks_big_bytes);
+ HDfree(coord_bytes);
+ HDfree(coord_big_bytes);
+
PASSED();
return SUCCEED;
@@ -10857,10 +11192,18 @@ error:
H5Fclose(fid);
}
H5E_END_TRY;
- if (wbuf_big)
- HDfree(wbuf_big);
- if (rbuf_big)
- HDfree(rbuf_big);
+
+ HDfree(wbuf_big);
+ HDfree(rbuf_big);
+ HDfree(chunks);
+ HDfree(chunks_big);
+ HDfree(coord);
+ HDfree(coord_big);
+ HDfree(chunks_bytes);
+ HDfree(chunks_big_bytes);
+ HDfree(coord_bytes);
+ HDfree(coord_big_bytes);
+
return FAIL;
} /* end test_fixed_array() */
@@ -12165,6 +12508,9 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly");
+ /* Initialize struct */
+ HDmemset(&info, 0, sizeof(info));
+
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
@@ -14616,6 +14962,200 @@ error:
return FAIL;
} /* end test_object_header_minimization_dcpl() */
+/*-----------------------------------------------------------------------------
+ * Function: test_0sized_dset_metadata_alloc
+ *
+ * Purpose: Tests the metadata allocation for 0-sized datasets.
+ *
+ * Return: Success/pass: 0
+ * Failure/error: -1
+ *
+ * Programmer: Quincey Koziol
+ * 2020 April 30
+ *
+ *-----------------------------------------------------------------------------
+ */
+static herr_t
+test_0sized_dset_metadata_alloc(hid_t fapl_id)
+{
+ char filename[FILENAME_BUF_SIZE] = "";
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id_copy = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dcpl_id_copy = H5I_INVALID_HID;
+ hid_t dset_space_id = H5I_INVALID_HID;
+ hid_t buf_space_id = H5I_INVALID_HID;
+ unsigned new_format; /* Whether to use latest file format */
+
+ TESTING("allocation of metadata for 0-sized datasets");
+
+ /*********/
+ /* SETUP */
+ /*********/
+
+ if (NULL == h5_fixname(FILENAME[26], fapl_id, filename, sizeof(filename)))
+ FAIL_STACK_ERROR
+
+ /* Create DCPL for the dataset */
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+
+ /*************/
+ /* RUN TESTS */
+ /*************/
+
+ /* Iterate over file format versions */
+ for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ H5D_layout_t layout; /* Dataset layout type */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+
+ /* Copy the file access property list */
+ if ((fapl_id_copy = H5Pcopy(fapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if (new_format)
+ if (H5Pset_libver_bounds(fapl_id_copy, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create test file */
+ if ((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id_copy)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the copy of the FAPL */
+ if (H5Pclose(fapl_id_copy) < 0)
+ FAIL_STACK_ERROR
+
+ /* Iterate over combinations of testing parameters */
+ for (layout = H5D_COMPACT; layout <= H5D_CHUNKED; layout++) {
+ for (alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; alloc_time++) {
+ const hsize_t dims[1] = {0}; /* Dataset dimensions */
+ const hsize_t max_dims[1] = {H5S_UNLIMITED}; /* Maximum dataset dimensions */
+ const hsize_t chunk_dims[1] = {100}; /* Chunk dimensions */
+ char dset_name[32]; /* Dataset name */
+ H5O_native_info_t nat_info; /* Information about the dataset */
+
+ /* Compact storage must have early allocation */
+ if (H5D_COMPACT == layout && H5D_ALLOC_TIME_EARLY != alloc_time)
+ continue;
+
+ /* Compose dataset name */
+ HDsnprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
+ (unsigned)layout);
+
+ /* Set up DCPL */
+ if ((dcpl_id_copy = H5Pcopy(dcpl_id)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pset_alloc_time(dcpl_id_copy, alloc_time) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pset_layout(dcpl_id_copy, layout) < 0)
+ FAIL_STACK_ERROR
+ if (H5D_CHUNKED == layout)
+ if (H5Pset_chunk(dcpl_id_copy, 1, chunk_dims) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dataspace for the dataset */
+ if ((dset_space_id = H5Screate_simple(1, dims, (H5D_CHUNKED == layout ? max_dims : NULL))) <
+ 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dataset with the appropriate parameters */
+ if ((dset_id = H5Dcreate2(file_id, dset_name, H5T_NATIVE_INT, dset_space_id, H5P_DEFAULT,
+ dcpl_id_copy, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close objects used to create dataset */
+ if (H5Pclose(dcpl_id_copy) < 0)
+ FAIL_STACK_ERROR
+ if (H5Sclose(dset_space_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Retrieve & verify the dataset's index info */
+ HDmemset(&nat_info, 0, sizeof(nat_info));
+ if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
+ FAIL_STACK_ERROR
+ if (0 != nat_info.meta_size.obj.index_size)
+ FAIL_PUTS_ERROR("dataset index allocation size is non-zero")
+
+ /* If chunked, try extending and verify that the index is allocated */
+ if (H5D_CHUNKED == layout) {
+ const hsize_t new_dims[1] = {1500}; /* New dataset dimensions */
+ const hsize_t mem_dims[1] = {1}; /* Memory buffer dataset dimensions */
+ const hsize_t coord = 0; /* Dataset selection coordinate */
+ int val = 0; /* Data value */
+
+ /* Extend dataset */
+ if (H5Dset_extent(dset_id, new_dims) < 0)
+ FAIL_STACK_ERROR
+
+ /* Get the dataspace for the dataset & set single point selection */
+ if ((dset_space_id = H5Dget_space(dset_id)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Sselect_elements(dset_space_id, H5S_SELECT_SET, (size_t)1,
+ (const hsize_t *)&coord) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create memory dataspace, with only one element */
+ if ((buf_space_id = H5Screate_simple(1, mem_dims, NULL)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Write the data to the dataset */
+ if (H5Dwrite(dset_id, H5T_NATIVE_INT, buf_space_id, dset_space_id, H5P_DEFAULT, &val) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close objects used to perform I/O */
+ if (H5Sclose(dset_space_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Sclose(buf_space_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Retrieve & verify the dataset's index info */
+ HDmemset(&nat_info, 0, sizeof(nat_info));
+ if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
+ FAIL_STACK_ERROR
+ if (0 == nat_info.meta_size.obj.index_size)
+ FAIL_PUTS_ERROR("dataset index allocation size is zero")
+ } /* end if */
+
+ /* Close dataset */
+ if (H5Dclose(dset_id) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+ } /* end for */
+
+ /* Close test file */
+ if (H5Fclose(file_id) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /************/
+ /* TEARDOWN */
+ /************/
+
+ if (H5Pclose(dcpl_id) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(dset_space_id);
+ H5Pclose(buf_space_id);
+ H5Pclose(fapl_id_copy);
+ H5Pclose(dcpl_id_copy);
+ H5Pclose(dcpl_id);
+ H5Dclose(dset_id);
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+
+ return FAIL;
+} /* end test_0sized_dset_metadata_alloc() */
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -14644,6 +15184,7 @@ main(void)
int nerrors = 0;
const char *envval;
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
+ int i;
/* Don't run this test using certain file drivers */
envval = HDgetenv("HDF5_DRIVER");
@@ -14651,11 +15192,44 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
+ /* Initialize global arrays */
+ /* points */
+ if (NULL == (points_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (points = (int **)HDcalloc(DSET_DIM1, sizeof(points_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ points[i] = points_data + (i * DSET_DIM2);
+
+ /* check */
+ if (NULL == (check_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (check = (int **)HDcalloc(DSET_DIM1, sizeof(check_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ check[i] = check_data + (i * DSET_DIM2);
+
+ /* points_dbl */
+ if (NULL == (points_dbl_data = (double *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
+ TEST_ERROR;
+ if (NULL == (points_dbl = (double **)HDcalloc(DSET_DIM1, sizeof(points_dbl_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ points_dbl[i] = points_dbl_data + (i * DSET_DIM2);
+
+ /* check_dbl */
+ if (NULL == (check_dbl_data = (double *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(double))))
+ TEST_ERROR;
+ if (NULL == (check_dbl = (double **)HDcalloc(DSET_DIM1, sizeof(check_dbl_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ check_dbl[i] = check_dbl_data + (i * DSET_DIM2);
+
/* Testing setup */
h5_reset();
fapl = h5_fileaccess();
@@ -14773,6 +15347,7 @@ main(void)
nerrors += (test_missing_filter(file) < 0 ? 1 : 0);
nerrors += (test_can_apply(file) < 0 ? 1 : 0);
nerrors += (test_can_apply2(file) < 0 ? 1 : 0);
+ nerrors += (test_optional_filters(file) < 0 ? 1 : 0);
nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0);
nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0);
nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0);
@@ -14835,7 +15410,8 @@ main(void)
nerrors += (test_object_header_minimization_dcpl() < 0 ? 1 : 0);
/* Run misc tests */
- nerrors += dls_01_main();
+ nerrors += (dls_01_main() < 0 ? 1 : 0);
+ nerrors += (test_0sized_dset_metadata_alloc(fapl) < 0 ? 1 : 0);
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
@@ -14849,9 +15425,29 @@ main(void)
#endif /* H5_HAVE_FILTER_SZIP */
h5_cleanup(FILENAME, fapl);
+ HDfree(points);
+ HDfree(check);
+ HDfree(points_dbl);
+ HDfree(check_dbl);
+
+ HDfree(points_data);
+ HDfree(check_data);
+ HDfree(points_dbl_data);
+ HDfree(check_dbl_data);
+
HDexit(EXIT_SUCCESS);
error:
+ HDfree(points);
+ HDfree(check);
+ HDfree(points_dbl);
+ HDfree(check_dbl);
+
+ HDfree(points_data);
+ HDfree(check_data);
+ HDfree(points_dbl_data);
+ HDfree(check_dbl_data);
+
nerrors = MAX(1, nerrors);
HDprintf("***** %d DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
HDexit(EXIT_FAILURE);
diff --git a/test/dt_arith.c b/test/dt_arith.c
index c425db0..0ce1475 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the data type interface (H5T)
@@ -84,7 +84,7 @@ static int skip_overflow_tests_g = 0;
* be allowed to continue (cf. Posix signals) so in order to recover from a
* SIGFPE we run tests that might generate one in a child process.
*/
-#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
+#ifdef H5_HAVE_UNISTD_H
#define HANDLE_SIGFPE
#endif
@@ -359,7 +359,7 @@ static int without_hardware_g = 0;
\
for (n = 0; n < 2; n++) { \
if (n == 1) { \
- memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
+ HDmemset(value, 0, SRC_SIZE * sizeof(unsigned char)); \
/* -0 */ \
H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
@@ -397,8 +397,8 @@ static int without_hardware_g = 0;
void some_dummy_func(float x);
static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
static int my_isnan(dtype_t type, void *val);
-static int my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
- size_t esize);
+static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
+ size_t esize);
/*-------------------------------------------------------------------------
* Function: fpe_handler
@@ -556,7 +556,7 @@ some_dummy_func(float x)
static void
generates_sigfpe(void)
{
-#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
+#ifdef H5_HAVE_UNISTD_H
pid_t pid;
int status;
size_t i, j;
@@ -566,7 +566,7 @@ generates_sigfpe(void)
HDfflush(stdout);
HDfflush(stderr);
- if ((pid = fork()) < 0) {
+ if ((pid = HDfork()) < 0) {
HDperror("fork");
HDexit(EXIT_FAILURE);
}
@@ -580,7 +580,7 @@ generates_sigfpe(void)
HDexit(EXIT_SUCCESS);
}
- while (pid != waitpid(pid, &status, 0))
+ while (pid != HDwaitpid(pid, &status, 0))
/*void*/;
if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) {
HDputs("Floating-point overflow cases will be tested.");
@@ -592,12 +592,12 @@ generates_sigfpe(void)
/* delete the core dump file that SIGFPE may have created */
HDunlink("core");
}
-#else
- HDputs("Cannot determine if floating-point overflows generate a SIGFPE;");
- HDputs("assuming yes.");
+#else /* H5_HAVE_UNISTD_H */
+ HDputs("Cannot determine if floating-point overflows generate a SIGFPE");
+ HDputs("due to a lack of fork(2) - assuming yes.");
HDputs("Overflow cases will not be tested.");
skip_overflow_tests_g = TRUE;
-#endif
+#endif /* H5_HAVE_UNISTD_H */
}
/*-------------------------------------------------------------------------
@@ -775,7 +775,7 @@ test_particular_fp_integer(void)
/* Print errors */
if (dst_c != SCHAR_MAX) {
- double x = 0.;
+ double x = 0.0;
signed char y;
if (0 == fails_this_test++)
@@ -819,7 +819,7 @@ test_particular_fp_integer(void)
/* Print errors */
if (dst_i != fill_value) {
- float x = 0.;
+ float x = 0.0;
int y;
if (0 == fails_this_test++)
@@ -2391,7 +2391,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
/* Make certain that there isn't some weird number of destination bits */
- assert(dst_nbits % 8 == 0);
+ HDassert(dst_nbits % 8 == 0);
/* Are the two results the same? */
for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++)
@@ -2786,18 +2786,18 @@ my_isnan(dtype_t type, void *val)
char s[256];
if (FLT_FLOAT == type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
retval = (x != x);
}
else if (FLT_DOUBLE == type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
retval = (x != x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0
}
else if (FLT_LDOUBLE == type) {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
retval = (x != x);
#endif
@@ -2812,20 +2812,20 @@ my_isnan(dtype_t type, void *val)
*/
if (!retval) {
if (FLT_FLOAT == type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
HDsnprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
HDsnprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0
}
else if (FLT_LDOUBLE == type) {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
HDsnprintf(s, sizeof(s), "%Lg", x);
@@ -2856,7 +2856,8 @@ my_isnan(dtype_t type, void *val)
*-------------------------------------------------------------------------
*/
static int
-my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, size_t esize)
+my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
+ size_t esize)
{
unsigned char *bits;
int retval = 0;
@@ -2948,12 +2949,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
*/
HDfflush(stdout);
HDfflush(stderr);
- if ((child_pid = fork()) < 0) {
+ if ((child_pid = HDfork()) < 0) {
HDperror("fork");
return 1;
}
else if (child_pid > 0) {
- while (child_pid != waitpid(child_pid, &status, 0)) /*void*/
+ while (child_pid != HDwaitpid(child_pid, &status, 0)) /*void*/
;
if (WIFEXITED(status) && 255 == WEXITSTATUS(status)) {
return 0; /*child exit after catching SIGFPE*/
@@ -3022,7 +3023,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
if (sizeof(float) == sizeof(double))
HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
if (OTHER == src_type || OTHER == dst_type) {
- if (!strcmp(name, "noop"))
+ if (!HDstrcmp(name, "noop"))
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
dst_type_name);
else if (run_test == TEST_SPECIAL)
@@ -3041,7 +3042,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
goto error;
}
else {
- if (!strcmp(name, "noop"))
+ if (!HDstrcmp(name, "noop"))
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
dst_type_name);
else if (run_test == TEST_SPECIAL)
@@ -3286,7 +3287,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
int check_expo[2];
if (FLT_FLOAT == dst_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
@@ -3297,7 +3298,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
check_mant[1] = HDfrexpf(hw_f, check_expo + 1);
}
else if (FLT_DOUBLE == dst_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
@@ -3309,7 +3310,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
#if H5_SIZEOF_LONG_DOUBLE != 0 && (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE)
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
check_mant[0] = (double)HDfrexpl(x, check_expo + 0);
@@ -3321,7 +3322,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
int expo_diff = check_expo[0] - check_expo[1];
int valid_bits =
(int)((dst_ebias + dst_msize) + (size_t)MIN(check_expo[0], check_expo[1])) - 1;
- double epsilon = 1.0F;
+ double epsilon = 1.0;
/* Re-scale the mantissas based on any exponent difference */
if (expo_diff != 0)
@@ -3356,18 +3357,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]);
HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), "");
if (FLT_FLOAT == src_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == src_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &saved[j * src_size], sizeof(long double));
HDfprintf(stdout, " %29.20Le\n", x);
#endif
@@ -3378,18 +3379,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]);
HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), "");
if (FLT_FLOAT == dst_type) {
- float x = 0.;
+ float x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
}
else if (FLT_DOUBLE == dst_type) {
- double x = 0.;
+ double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- long double x = 0.;
+ long double x = 0.0;
HDmemcpy(&x, &buf[j * dst_size], sizeof(long double));
HDfprintf(stdout, " %29.20Le\n", x);
#endif
@@ -4350,7 +4351,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
/* Make certain that there isn't some weird number of destination bits */
- assert(dst_nbits % 8 == 0);
+ HDassert(dst_nbits % 8 == 0);
/* For Intel machines, the size of "long double" is 12 bytes, precision
* is 80 bits; for AMD processors, the size of "long double" is 16 bytes,
@@ -5009,7 +5010,7 @@ run_fp_tests(const char *name)
{
int nerrors = 0;
- if (!strcmp(name, "noop")) {
+ if (!HDstrcmp(name, "noop")) {
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
#if H5_SIZEOF_LONG_DOUBLE != 0
@@ -5246,7 +5247,7 @@ run_fp_int_conv(const char *name)
#endif
#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
- if (!strcmp(name, "hw")) { /* Hardware conversion */
+ if (!HDstrcmp(name, "hw")) { /* Hardware conversion */
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
}
diff --git a/test/dtransform.c b/test/dtransform.c
index 698823b..9445d83 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,12 +18,12 @@
#define FLOAT_TOL 0.0001F
static int init_test(hid_t file_id);
-static int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy);
-static int test_trivial(const hid_t dxpl_id_simple);
-static int test_poly(const hid_t dxpl_id_polynomial);
+static int test_copy(hid_t dxpl_id_c_to_f_copy, hid_t dxpl_id_polynomial_copy);
+static int test_trivial(hid_t dxpl_id_simple);
+static int test_poly(hid_t dxpl_id_polynomial);
static int test_specials(hid_t file);
static int test_set(void);
-static int test_getset(const hid_t dxpl_id_simple);
+static int test_getset(hid_t dxpl_id_simple);
/* These are needed for multiple tests, so are declared here globally and are init'ed in init_test */
hid_t dset_id_int = -1;
@@ -581,6 +581,7 @@ test_specials(hid_t file)
const char *special3 = "1000/x";
const char *special4 = "-x";
const char *special5 = "+x";
+ const char *special6 = "2e+1*x";
TESTING("data transform of some special cases")
@@ -705,6 +706,29 @@ test_specials(hid_t file)
if (H5Dclose(dset_id) < 0)
TEST_ERROR
+ /*-----------------------------
+ * Operation 6: 2e+1*x
+ *----------------------------*/
+ if (H5Pset_data_transform(dxpl_id, special6) < 0)
+ TEST_ERROR;
+
+ for (row = 0; row < ROWS; row++)
+ for (col = 0; col < COLS; col++)
+ data_res[row][col] = transformData[row][col] * 20;
+
+ if ((dset_id = H5Dcreate2(file, "/special6", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, transformData) < 0)
+ TEST_ERROR
+ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0)
+ TEST_ERROR
+
+ COMPARE_INT(read_buf, data_res)
+
+ if (H5Dclose(dset_id) < 0)
+ TEST_ERROR
+
if (H5Pclose(dxpl_id) < 0)
TEST_ERROR
if (H5Sclose(dataspace) < 0)
@@ -766,7 +790,7 @@ test_trivial(const hid_t dxpl_id_simple)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n");
}
- PASSED()
+ PASSED();
TESTING("data transform, trivial transform, with type conversion")
if (H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_simple, windchillFintread) < 0)
@@ -777,7 +801,7 @@ test_trivial(const hid_t dxpl_id_simple)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n")
}
- PASSED()
+ PASSED();
return 0;
error:
@@ -804,7 +828,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
if (HDstrcmp(c_to_f, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n")
- PASSED()
+ PASSED();
HDfree(ptrgetTest);
ptrgetTest = NULL;
@@ -823,7 +847,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n")
}
- PASSED()
+ PASSED();
TESTING("H5Pget_data_transform, after resetting transform property")
@@ -834,7 +858,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
if (HDstrcmp(simple, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n")
- PASSED()
+ PASSED();
HDfree(ptrgetTest);
ptrgetTest = NULL;
@@ -870,7 +894,7 @@ test_set(void)
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
if (H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
- PASSED()
+ PASSED();
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
diff --git a/test/dtypes.c b/test/dtypes.c
index df292ee..29bb38b 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the datatype interface (H5T)
@@ -134,16 +134,13 @@ static int opaque_funcs(void);
/*-------------------------------------------------------------------------
* Function: reset_hdf5
*
- * Purpose: Reset the hdf5 library. This causes statistics to be printed
- * and counters to be reset.
+ * Purpose: Reset the hdf5 library. This causes statistics to be printed
+ * and counters to be reset.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 16, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
@@ -175,14 +172,10 @@ reset_hdf5(void)
* Purpose: Test type classes
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -299,14 +292,10 @@ error:
* Purpose: Are we able to copy a datatype?
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -348,7 +337,6 @@ error:
* in nested types)
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Quincey Koziol
@@ -578,14 +566,10 @@ error:
* Purpose: Tests various things about compound datatypes.
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -764,19 +748,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_2
*
- * Purpose: Tests a compound type conversion where the source and
- * destination are the same except for the order of the
- * elements.
- *
- * Return: Success: 0
+ * Purpose: Tests a compound type conversion where the source and
+ * destination are the same except for the order of the
+ * elements.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -888,19 +868,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_3
*
- * Purpose: Tests compound conversions where the source and destination
- * are the same except the destination is missing a couple
- * members which appear in the source.
+ * Purpose: Tests compound conversions where the source and destination
+ * are the same except the destination is missing a couple
+ * members which appear in the source.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1008,19 +984,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_4
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * smaller.
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * smaller.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1135,20 +1107,16 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_5
*
- * Purpose: Many versions of HDF5 have a bug in the optimized compound
+ * Purpose: Many versions of HDF5 have a bug in the optimized compound
* datatype conversion function, H5T_conv_struct_opt(), which
* is triggered when the top-level type contains a struct
* which must undergo a conversion.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1215,7 +1183,7 @@ test_compound_5(void)
H5Tclose(int_array);
/* Check results */
- if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) || src[1].tdim != dst[1].tdim ||
+ if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim ||
src[1].coll_ids[0] != dst[1].coll_ids[0] || src[1].coll_ids[1] != dst[1].coll_ids[1] ||
src[1].coll_ids[2] != dst[1].coll_ids[2] || src[1].coll_ids[3] != dst[1].coll_ids[3]) {
H5_FAILED();
@@ -1234,19 +1202,15 @@ test_compound_5(void)
/*-------------------------------------------------------------------------
* Function: test_compound_6
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * larger.
- *
- * Return: Success: 0
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * larger.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, December 13, 2000
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1344,15 +1308,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_7
*
- * Purpose: Tests inserting fields into compound datatypes when the field
+ * Purpose: Tests inserting fields into compound datatypes when the field
* overlaps the end of the compound datatype. Also, tests
* increasing compound type size.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 18, 2001
*
* Modifications:
@@ -1519,10 +1482,10 @@ test_compound_8(void)
int b;
} s1;
- typedef struct s2 {
+ struct s2 {
char c;
s1 d;
- } s2;
+ };
hid_t tid1, tid1_copy, tid2, tid2_copy, tid3, arr_tid;
size_t tsize;
hsize_t dims[1] = {ARRAY_DIM};
@@ -1777,9 +1740,6 @@ error:
*
* Programmer: Raymond Lu
* Wednesday, June 9, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1908,7 +1868,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str)) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -1982,7 +1942,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str)) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -2172,7 +2132,7 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
if (rdata[i].i1 != wdata[i].i1 || rdata[i].i2 != wdata[i].i2 ||
- HDstrcmp(rdata[i].str, wdata[i].str)) {
+ HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -2188,7 +2148,7 @@ test_compound_10(void)
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
- if (strcmp((char *)t1, (char *)t2)) {
+ if (HDstrcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect VL read data\n");
@@ -2324,9 +2284,9 @@ test_compound_11(void)
/* Initialize buffer */
for (u = 0; u < NTESTELEM; u++) {
- ((big_t *)buf)[u].d1 = (double)u * (double)1.5f;
- ((big_t *)buf)[u].d2 = (double)u * (double)2.5f;
- ((big_t *)buf)[u].d3 = (double)u * (double)3.5f;
+ ((big_t *)buf)[u].d1 = (double)u * 1.5;
+ ((big_t *)buf)[u].d2 = (double)u * 2.5;
+ ((big_t *)buf)[u].d3 = (double)u * 3.5;
((big_t *)buf)[u].i1 = (int)(u * 3);
((big_t *)buf)[u].i2 = (int)(u * 5);
((big_t *)buf)[u].s1 = (char *)HDmalloc((size_t)32);
@@ -2373,7 +2333,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2424,7 +2384,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2465,7 +2425,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2596,7 +2556,7 @@ test_compound_12(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- puts(" Tries to cut off the last member. Should have failed.");
+ HDputs(" Tries to cut off the last member. Should have failed.");
goto error;
}
@@ -3050,14 +3010,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str)) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3148,14 +3108,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str)) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3997,7 +3957,7 @@ test_query(void)
HDprintf("Can't get name for enum member\n");
goto error;
} /* end if */
- if (strcmp("YELLOW", enum_name)) {
+ if (HDstrcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
HDprintf("Incorrect name for enum member\n");
goto error;
@@ -4637,14 +4597,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C-string test failed");
goto error;
@@ -4668,14 +4628,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C buffer test failed");
goto error;
@@ -4699,14 +4659,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde abcde ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended Fortran-string test failed");
goto error;
@@ -4733,7 +4693,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 1");
goto error;
@@ -4744,7 +4704,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
@@ -4752,7 +4712,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
@@ -4776,14 +4736,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 1");
goto error;
@@ -4795,14 +4755,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 2");
goto error;
@@ -4818,14 +4778,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 3");
goto error;
@@ -4849,14 +4809,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 1");
goto error;
@@ -4868,14 +4828,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 2");
goto error;
@@ -4891,14 +4851,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 3");
goto error;
@@ -5305,17 +5265,13 @@ test_conv_enum_2(void)
/*-------------------------------------------------------------------------
* Function: test_conv_bitfield
*
- * Purpose: Test bitfield conversions.
+ * Purpose: Test bitfield conversions.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5339,7 +5295,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0xAA || buf[1] != 0xAA || buf[2] != 0 || buf[3] != 0) {
H5_FAILED();
- printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", buf[3], buf[2], buf[1], buf[0]);
+ HDprintf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5360,7 +5316,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0 || buf[1] != 0xA8 || buf[2] != 0x2A || buf[3] != 0) {
H5_FAILED();
- printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", buf[3], buf[2], buf[1], buf[0]);
+ HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5376,7 +5332,7 @@ test_conv_bitfield(void)
goto error;
if (buf[0] != 0xff || buf[1] != 0xAB || buf[2] != 0xEA || buf[3] != 0xff) {
H5_FAILED();
- printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", buf[3], buf[2], buf[1], buf[0]);
+ HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", buf[3], buf[2], buf[1], buf[0]);
goto error;
}
@@ -5405,18 +5361,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_bitfield_funcs
*
- * Purpose: Test some datatype functions that are and aren't supposed
+ * Purpose: Test some datatype functions that are and aren't supposed
* work for bitfield type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5556,17 +5508,13 @@ error:
/*-------------------------------------------------------------------------
* Function: convert_opaque
*
- * Purpose: A fake opaque conversion functions
- *
- * Return: Success: 0
+ * Purpose: A fake opaque conversion functions
*
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, June 4, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5583,17 +5531,13 @@ convert_opaque(hid_t H5_ATTR_UNUSED st, hid_t H5_ATTR_UNUSED dt, H5T_cdata_t *cd
/*-------------------------------------------------------------------------
* Function: test_opaque
*
- * Purpose: Driver function to test opaque datatypes
+ * Purpose: Driver function to test opaque datatypes
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* June 2, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5625,15 +5569,13 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_check
*
- * Purpose: Test opaque datatypes
- *
- * Return: Success: 0
+ * Purpose: Test opaque datatypes
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5668,7 +5610,7 @@ opaque_check(int tag_it)
H5E_END_TRY;
if (status >= 0) {
H5_FAILED();
- printf(" opaque conversion should have failed but succeeded\n");
+ HDprintf(" opaque conversion should have failed but succeeded\n");
goto error;
}
@@ -5681,7 +5623,7 @@ opaque_check(int tag_it)
goto error;
if (saved + 1 != num_opaque_conversions_g) {
H5_FAILED();
- printf(" unexpected number of opaque conversions\n");
+ HDprintf(" unexpected number of opaque conversions\n");
goto error;
}
@@ -5705,12 +5647,12 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_long
*
- * Purpose: Test named (committed) opaque datatypes w/very long tags
+ * Purpose: Test named (committed) opaque datatypes w/very long tags
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 14, 2005
*
*-------------------------------------------------------------------------
@@ -5762,18 +5704,14 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_funcs
*
- * Purpose: Test some type functions that are and aren't supposed to
+ * Purpose: Test some type functions that are and aren't supposed to
* work with opaque type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -7262,18 +7200,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_named_indirect_reopen
*
- * Purpose: Tests that open named datatypes can be reopened indirectly
+ * Purpose: Tests that open named datatypes can be reopened indirectly
* through H5Dget_type without causing problems.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Thursday, June 4, 2009
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -7439,7 +7373,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR
- if (HDstrcmp(tag, tag_ret))
+ if (HDstrcmp(tag, tag_ret) != 0)
TEST_ERROR
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7455,7 +7389,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR
- if (HDstrcmp(tag, tag_ret))
+ if (HDstrcmp(tag, tag_ret) != 0)
TEST_ERROR
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7958,12 +7892,12 @@ error:
/*-------------------------------------------------------------------------
* Function: test_deprec
*
- * Purpose: Tests deprecated API routines for datatypes.
+ * Purpose: Tests deprecated API routines for datatypes.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, September 27, 2007
*
*-------------------------------------------------------------------------
@@ -8129,13 +8063,13 @@ error:
/*-------------------------------------------------------------------------
* Function: test_utf_ascii_conv
*
- * Purpose: Make sure the library doesn't conversion strings between
+ * Purpose: Make sure the library doesn't conversion strings between
* ASCII and UTF8.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 10 November 2011
*-------------------------------------------------------------------------
*/
@@ -8808,16 +8742,13 @@ error:
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
main(void)
{
long nerrors = 0;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -8826,7 +8757,7 @@ main(void)
fapl = h5_fileaccess();
if (ALIGNMENT)
- printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
+ HDprintf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
/* Do the tests */
nerrors += test_classes();
diff --git a/test/earray.c b/test/earray.c
index 45b5276..7cbc842 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Tuesday, June 17, 2008
*/
#include "h5test.h"
@@ -122,7 +122,7 @@ typedef struct earray_iter_t {
hsize_t cnt); /* Initialize/allocate iterator private info */
hssize_t (*next)(void *info); /* Get the next element to test */
hssize_t (*max_elem)(const void *info); /* Get the max. element set */
- int (*state)(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+ int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx); /* Get the state of the extensible array */
herr_t (*term)(void *info); /* Shutdown/free iterator private info */
} earray_iter_t;
@@ -332,61 +332,67 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
/* Compare information */
if (earray_stats.stored.max_idx_set != state->max_idx_set) {
- HDfprintf(stdout, "earray_stats.stored.max_idx_set = %Hu, state->max_idx_set = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n",
earray_stats.stored.max_idx_set, state->max_idx_set);
TEST_ERROR
} /* end if */
if (earray_stats.stored.nelmts != state->nelmts) {
- HDfprintf(stdout, "earray_stats.stored.nelmts = %Hu, state->nelmts = %Hu\n",
+ HDfprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
earray_stats.stored.nelmts, state->nelmts);
TEST_ERROR
} /* end if */
if (earray_stats.computed.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "earray_stats.computed.hdr_size = %Hu, state->hdr_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
earray_stats.computed.hdr_size, state->hdr_size);
TEST_ERROR
} /* end if */
if (earray_stats.computed.nindex_blks != state->nindex_blks) {
- HDfprintf(stdout, "earray_stats.computed.nindex_blks = %Hu, state->nindex_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n",
earray_stats.computed.nindex_blks, state->nindex_blks);
TEST_ERROR
} /* end if */
if (earray_stats.computed.index_blk_size != state->index_blk_size) {
- HDfprintf(stdout, "earray_stats.computed.index_blk_size = %Hu, state->index_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.computed.index_blk_size, state->index_blk_size);
TEST_ERROR
} /* end if */
if (earray_stats.stored.ndata_blks != state->ndata_blks) {
- HDfprintf(stdout, "earray_stats.stored.ndata_blks = %Hu, state->ndata_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n",
earray_stats.stored.ndata_blks, state->ndata_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.data_blk_size != state->data_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.stored.data_blk_size, state->data_blk_size);
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
if (earray_stats.stored.nsuper_blks != state->nsuper_blks) {
- HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n",
earray_stats.stored.nsuper_blks, state->nsuper_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.super_blk_size != state->super_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.stored.super_blk_size, state->super_blk_size);
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
-#ifdef QAK
- HDfprintf(stderr, "nelmts = %Hu, total EA size = %Hu\n", earray_stats.stored.nelmts,
- (earray_stats.computed.hdr_size + earray_stats.computed.index_blk_size +
- earray_stats.stored.super_blk_size + earray_stats.stored.data_blk_size));
-#endif /* QAK */
/* All tests passed */
return (0);
@@ -557,12 +563,6 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
if (H5EA_close(ea) < 0)
FAIL_STACK_ERROR
-#ifdef QAK
- HDfprintf(stderr, "ea_addr = %a\n", ea_addr);
- H5Fflush(file, H5F_SCOPE_GLOBAL);
- HDsystem("cp earray.h5 earray.h5.save");
-#endif /* QAK */
-
/* Delete array */
if (H5EA_delete(f, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
@@ -785,11 +785,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
} /* end if */
- PASSED()
+ PASSED();
}
#else /* NDEBUG */
SKIPPED();
- puts(" Not tested when assertions are disabled");
+ HDputs(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -801,7 +801,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
if (create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Verify the creation parameters */
TESTING("verify array creation parameters");
@@ -815,7 +815,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -886,7 +886,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -991,7 +991,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1131,7 +1131,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1257,7 +1257,7 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1326,9 +1326,9 @@ eiter_fw_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_para
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_fw_next(void *_eiter)
+eiter_fw_next(void *in_eiter)
{
- eiter_fw_t *eiter = (eiter_fw_t *)_eiter;
+ eiter_fw_t *eiter = (eiter_fw_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1354,9 +1354,9 @@ eiter_fw_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_fw_max(const void *_eiter)
+eiter_fw_max(const void *in_eiter)
{
- const eiter_fw_t *eiter = (const eiter_fw_t *)_eiter;
+ const eiter_fw_t *eiter = (const eiter_fw_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1379,10 +1379,10 @@ eiter_fw_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+eiter_fw_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx)
{
- eiter_fw_t *eiter = (eiter_fw_t *)_eiter;
+ eiter_fw_t *eiter = (eiter_fw_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1407,21 +1407,8 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
/* (same eqn. as in H5EA__dblock_sblk_idx()) */
sblk_idx =
H5VM_log2_gen((uint64_t)(((idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
-#ifdef QAK
- HDfprintf(stderr, "idx = %Hu, tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx, sblk_idx,
- tparam->sblk_info[sblk_idx].ndblks, tparam->sblk_info[sblk_idx].dblk_nelmts,
- tparam->sblk_info[sblk_idx].start_idx, tparam->sblk_info[sblk_idx].start_dblk);
-#endif /* QAK */
-
- state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
- HDfprintf(stderr, "state->nelmts = %Hu\n", state->nelmts);
-#endif /* QAK */
-
+ state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
state->ndata_blks = EA_NDATA_BLKS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
- HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if (tparam->sblk_info[sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1430,9 +1417,6 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
eiter->base_sblk_idx = sblk_idx;
state->nsuper_blks = (sblk_idx - eiter->base_sblk_idx) + 1;
-#ifdef QAK
- HDfprintf(stderr, "state->nsuper_blks = %Hu\n", state->nsuper_blks);
-#endif /* QAK */
} /* end if */
else
state->nsuper_blks = 0;
@@ -1542,9 +1526,9 @@ eiter_rv_init(const H5EA_create_t *cparam, const earray_test_param_t *tparam, hs
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_rv_next(void *_eiter)
+eiter_rv_next(void *in_eiter)
{
- eiter_rv_t *eiter = (eiter_rv_t *)_eiter;
+ eiter_rv_t *eiter = (eiter_rv_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1570,9 +1554,9 @@ eiter_rv_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_rv_max(const void *_eiter)
+eiter_rv_max(const void *in_eiter)
{
- const eiter_rv_t *eiter = (const eiter_rv_t *)_eiter;
+ const eiter_rv_t *eiter = (const eiter_rv_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1595,10 +1579,10 @@ eiter_rv_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+eiter_rv_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx)
{
- eiter_rv_t *eiter = (eiter_rv_t *)_eiter;
+ eiter_rv_t *eiter = (eiter_rv_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1641,40 +1625,18 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
loc_sblk_idx = H5VM_log2_gen(
(uint64_t)(((loc_idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
} /* end else */
-#ifdef QAK
- HDfprintf(
- stderr,
- "idx = %Hu, loc_idx = %Hu, eiter->max_sblk_idx = %u, idx_sblk_idx = %u, loc_sblk_idx = %u\n", idx,
- loc_idx, eiter->max_sblk_idx, idx_sblk_idx, loc_sblk_idx);
- HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx_sblk_idx,
- tparam->sblk_info[idx_sblk_idx].ndblks, tparam->sblk_info[idx_sblk_idx].dblk_nelmts,
- tparam->sblk_info[idx_sblk_idx].start_idx, tparam->sblk_info[idx_sblk_idx].start_dblk);
- HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", eiter->max_sblk_idx,
- tparam->sblk_info[eiter->max_sblk_idx].ndblks,
- tparam->sblk_info[eiter->max_sblk_idx].dblk_nelmts,
- tparam->sblk_info[eiter->max_sblk_idx].start_idx,
- tparam->sblk_info[eiter->max_sblk_idx].start_dblk);
-#endif /* QAK */
if (idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_nelmts = (hsize_t)cparam->idx_blk_elmts;
else
idx_nelmts = EA_NELMTS(cparam, tparam, loc_idx, loc_sblk_idx);
state->nelmts = (eiter->max_nelmts - idx_nelmts) + cparam->idx_blk_elmts;
-#ifdef QAK
- HDfprintf(stderr, "eiter->max_nelmts = %Hu, idx_nelmts = %Hu, state->nelmts = %Hu\n",
- eiter->max_nelmts, idx_nelmts, state->nelmts);
-#endif /* QAK */
if (idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_ndata_blks = 0;
else
idx_ndata_blks = EA_NDATA_BLKS(cparam, tparam, loc_idx, loc_sblk_idx);
state->ndata_blks = eiter->max_ndata_blks - idx_ndata_blks;
-#ifdef QAK
- HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->ndata_blks = %Hu\n",
- eiter->max_ndata_blks, idx_ndata_blks, state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if (tparam->sblk_info[eiter->max_sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1682,10 +1644,6 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
state->nsuper_blks = (eiter->max_sblk_idx - idx_sblk_idx) + 1;
else
state->nsuper_blks = (eiter->max_sblk_idx - eiter->idx_blk_nsblks) + 1;
-#ifdef QAK
- HDfprintf(stderr, "eiter->idx_blk_nsblks = %Hu, state->nsuper_blks = %Hu\n",
- eiter->idx_blk_nsblks, state->nsuper_blks);
-#endif /* QAK */
} /* end if */
} /* end else */
@@ -1798,9 +1756,9 @@ eiter_rnd_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_rnd_next(void *_eiter)
+eiter_rnd_next(void *in_eiter)
{
- eiter_rnd_t *eiter = (eiter_rnd_t *)_eiter;
+ eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1831,9 +1789,9 @@ eiter_rnd_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_rnd_max(const void *_eiter)
+eiter_rnd_max(const void *in_eiter)
{
- const eiter_rnd_t *eiter = (const eiter_rnd_t *)_eiter;
+ const eiter_rnd_t *eiter = (const eiter_rnd_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1856,9 +1814,9 @@ eiter_rnd_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_rnd_term(void *_eiter)
+eiter_rnd_term(void *in_eiter)
{
- eiter_rnd_t *eiter = (eiter_rnd_t *)_eiter;
+ eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2012,9 +1970,9 @@ eiter_cyc_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_cyc_next(void *_eiter)
+eiter_cyc_next(void *in_eiter)
{
- eiter_cyc_t *eiter = (eiter_cyc_t *)_eiter;
+ eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -2047,9 +2005,9 @@ eiter_cyc_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_cyc_max(const void *_eiter)
+eiter_cyc_max(const void *in_eiter)
{
- const eiter_cyc_t *eiter = (const eiter_cyc_t *)_eiter;
+ const eiter_cyc_t *eiter = (const eiter_cyc_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2072,9 +2030,9 @@ eiter_cyc_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_cyc_term(void *_eiter)
+eiter_cyc_term(void *in_eiter)
{
- eiter_cyc_t *eiter = (eiter_cyc_t *)_eiter;
+ eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2256,7 +2214,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, h
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2415,7 +2373,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2505,12 +2463,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case EARRAY_TEST_NORMAL:
- puts("Testing with normal parameters");
+ HDputs("Testing with normal parameters");
break;
/* "Re-open array" testing parameters */
case EARRAY_TEST_REOPEN:
- puts("Testing with reopen array flag set");
+ HDputs("Testing with reopen array flag set");
tparam.reopen_array = EARRAY_TEST_REOPEN;
break;
@@ -2539,31 +2497,31 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case EARRAY_ITER_FW:
- puts("Testing with forward iteration");
+ HDputs("Testing with forward iteration");
tparam.eiter = &ea_iter_fw;
break;
/* "Reverse" testing parameters */
case EARRAY_ITER_RV:
- puts("Testing with reverse iteration");
+ HDputs("Testing with reverse iteration");
tparam.eiter = &ea_iter_rv;
break;
/* "Random" testing parameters */
case EARRAY_ITER_RND:
- puts("Testing with random iteration");
+ HDputs("Testing with random iteration");
tparam.eiter = &ea_iter_rnd;
break;
/* "Random #2" testing parameters */
case EARRAY_ITER_RND2:
- puts("Testing with random #2 iteration");
+ HDputs("Testing with random #2 iteration");
tparam.eiter = &ea_iter_rnd2;
break;
/* "Cyclic" testing parameters */
case EARRAY_ITER_CYC:
- puts("Testing with cyclic iteration");
+ HDputs("Testing with cyclic iteration");
tparam.eiter = &ea_iter_cyc;
break;
diff --git a/test/efc.c b/test/efc.c
index 3832064..1e702aa 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -24,8 +24,14 @@
const char *FILENAME[] = {"efc0", "efc1", "efc2", "efc3", "efc4", "efc5", NULL};
+/* Windows doesn't have PATH_MAX */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif /* !PATH_MAX */
+
/* Global patched filename buffer */
-static char filename[6][128];
+#define N_FILENAMES 6
+static char *filename[N_FILENAMES];
/* Global property lists - just copies of the defaults (necessary to use
* internal functions */
@@ -2647,8 +2653,9 @@ main(void)
{
unsigned nerrors = 0; /* track errors */
H5P_genplist_t * plist; /* Property list pointer for FAPL */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ int i; /* iterator */
/* Test Setup */
HDputs("Testing the external file cache");
@@ -2657,13 +2664,18 @@ main(void)
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
fapl_id = h5_fileaccess();
+ /* Allocate memory for filenames */
+ for (i = 0; i < N_FILENAMES; i++) {
+ filename[i] = (char *)HDcalloc(PATH_MAX, sizeof(char));
+ }
+
/* Patch filenames */
- h5_fixname(FILENAME[0], fapl_id, filename[0], sizeof(filename[0]));
- h5_fixname(FILENAME[1], fapl_id, filename[1], sizeof(filename[1]));
- h5_fixname(FILENAME[2], fapl_id, filename[2], sizeof(filename[2]));
- h5_fixname(FILENAME[3], fapl_id, filename[3], sizeof(filename[3]));
- h5_fixname(FILENAME[4], fapl_id, filename[4], sizeof(filename[4]));
- h5_fixname(FILENAME[5], fapl_id, filename[5], sizeof(filename[5]));
+ h5_fixname(FILENAME[0], fapl_id, filename[0], PATH_MAX);
+ h5_fixname(FILENAME[1], fapl_id, filename[1], PATH_MAX);
+ h5_fixname(FILENAME[2], fapl_id, filename[2], PATH_MAX);
+ h5_fixname(FILENAME[3], fapl_id, filename[3], PATH_MAX);
+ h5_fixname(FILENAME[4], fapl_id, filename[4], PATH_MAX);
+ h5_fixname(FILENAME[5], fapl_id, filename[5], PATH_MAX);
/* Push API context */
if (H5CX_push() < 0)
@@ -2703,6 +2715,10 @@ main(void)
h5_clean_files(FILENAME, fapl_id);
+ for (i = 0; i < N_FILENAMES; i++) {
+ HDfree(filename[i]);
+ }
+
return EXIT_SUCCESS;
error:
@@ -2717,5 +2733,9 @@ error:
if (api_ctx_pushed)
H5CX_pop();
+ for (i = 0; i < N_FILENAMES; i++) {
+ HDfree(filename[i]);
+ }
+
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 57f0a36..9b4879e 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -141,11 +141,11 @@ main(void)
hid_t vspace = -1; /* Virtual dset dataspaces */
hsize_t dims[1] = {3}; /* Data space current size */
hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
- double fill = 2.7f; /* Fill value */
+ double fill = 2.7; /* Fill value */
hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
- double w0 = 0.5f;
+ double w0 = 0.5;
unsigned max_compact;
unsigned min_dense;
const char * c_to_f = "x+32";
@@ -159,26 +159,26 @@ main(void)
TRUE,
FALSE,
(2 * 2048 * 1024),
- 0.3f,
+ 0.3,
(64 * 1024 * 1024),
(4 * 1024 * 1024),
60000,
H5C_incr__threshold,
- 0.8f,
- 3.0f,
+ 0.8,
+ 3.0,
TRUE,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
- 2.0f,
- 0.25f,
+ 2.0,
+ 0.25,
H5C_decr__age_out_with_threshold,
- 0.997f,
- 0.8f,
+ 0.997,
+ 0.8,
TRUE,
(3 * 1024 * 1024),
3,
FALSE,
- 0.2f,
+ 0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 14c58b7..9ea5cf9 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/enum.c b/test/enum.c
index ee3290f..3923892 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 22, 1998
*/
#include "h5test.h"
@@ -792,11 +792,11 @@ main(void)
if (nerrors)
goto error;
- puts("All enum tests passed.");
+ HDputs("All enum tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- puts("*** ENUM TESTS FAILED ***");
+ HDputs("*** ENUM TESTS FAILED ***");
return 1;
}
diff --git a/test/err_compat.c b/test/err_compat.c
index 579d62b..53c8667 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -33,7 +33,10 @@ const char *FILENAME[] = {"errors_compat", NULL};
#define DIM0 100
#define DIM1 200
-int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
+int **ipoints2 = NULL;
+int **icheck2 = NULL;
+int * ipoints2_data = NULL;
+int * icheck2_data = NULL;
#define DSET_NAME "a_dataset"
#define FAKE_ID (hid_t) - 1
@@ -453,11 +456,27 @@ main(void)
hid_t file, fapl;
char filename[1024];
const char *FUNC_main = "main";
+ int i;
HDfprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
"be some error messages\n");
fapl = h5_fileaccess();
+ /* Set up data arrays */
+ if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (ipoints2 = (int **)HDcalloc(DIM0, sizeof(ipoints2_data))))
+ TEST_ERROR;
+ for (i = 0; i < DIM0; i++)
+ ipoints2[i] = ipoints2_data + (i * DIM1);
+
+ if (NULL == (icheck2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (icheck2 = (int **)HDcalloc(DIM0, sizeof(icheck2_data))))
+ TEST_ERROR;
+ for (i = 0; i < DIM0; i++)
+ icheck2[i] = icheck2_data + (i * DIM1);
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -486,10 +505,20 @@ main(void)
TEST_ERROR;
h5_clean_files(FILENAME, fapl);
+ HDfree(ipoints2);
+ HDfree(ipoints2_data);
+ HDfree(icheck2);
+ HDfree(icheck2_data);
+
HDprintf("All error API tests passed.\n");
return 0;
error:
+ HDfree(ipoints2);
+ HDfree(ipoints2_data);
+ HDfree(icheck2);
+ HDfree(icheck2_data);
+
HDprintf("***** ERROR TEST FAILED! *****\n");
return 1;
}
diff --git a/test/error_test.c b/test/error_test.c
index 35e6595..c8205ff8 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -36,7 +36,10 @@ const char *FILENAME[] = {"errors", NULL};
#define DIM0 100
#define DIM1 200
-int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
+int **ipoints2 = NULL;
+int **icheck2 = NULL;
+int * ipoints2_data = NULL;
+int * icheck2_data = NULL;
hid_t ERR_CLS;
hid_t ERR_CLS2;
@@ -126,13 +129,8 @@ test_error(hid_t file)
TEST_ERROR;
if (old_data != NULL)
TEST_ERROR;
-#ifdef H5_USE_16_API
- if (old_func != (H5E_auto_t)H5Eprint)
- TEST_ERROR;
-#else /* H5_USE_16_API */
if (old_func != (H5E_auto2_t)H5Eprint2)
TEST_ERROR;
-#endif /* H5_USE_16_API */
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
TEST_ERROR;
@@ -197,7 +195,7 @@ init_error(void)
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if (HDstrcmp(ERR_CLS_NAME, cls_name))
+ if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0)
TEST_ERROR;
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
@@ -222,7 +220,7 @@ init_error(void)
TEST_ERROR;
if (msg_type != H5E_MINOR)
TEST_ERROR;
- if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG))
+ if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
TEST_ERROR;
/* Register another class for later testing. */
@@ -321,7 +319,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_long_desc(void)
{
@@ -377,7 +375,7 @@ error:
return -1;
} /* end test_long_desc() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: dump_error
@@ -508,7 +506,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_copy
*
- * Purpose: Test copyinging an error stack
+ * Purpose: Test copying an error stack
*
* Return: Success: 0
* Failure: -1
@@ -671,6 +669,7 @@ main(void)
hid_t estack_id = -1;
char filename[1024];
const char *FUNC_main = "main";
+ int i;
HDfprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
@@ -681,6 +680,21 @@ main(void)
if ((fapl = h5_fileaccess()) < 0)
TEST_ERROR;
+ /* Set up data arrays */
+ if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (ipoints2 = (int **)HDcalloc(DIM0, sizeof(ipoints2_data))))
+ TEST_ERROR;
+ for (i = 0; i < DIM0; i++)
+ ipoints2[i] = ipoints2_data + (i * DIM1);
+
+ if (NULL == (icheck2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (icheck2 = (int **)HDcalloc(DIM0, sizeof(icheck2_data))))
+ TEST_ERROR;
+ for (i = 0; i < DIM0; i++)
+ icheck2[i] = icheck2_data + (i * DIM1);
+
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -747,10 +761,20 @@ main(void)
h5_clean_files(FILENAME, fapl);
+ HDfree(ipoints2);
+ HDfree(ipoints2_data);
+ HDfree(icheck2);
+ HDfree(icheck2_data);
+
HDfprintf(stderr, "\nAll error API tests passed.\n");
return 0;
error:
+ HDfree(ipoints2);
+ HDfree(ipoints2_data);
+ HDfree(icheck2);
+ HDfree(icheck2_data);
+
HDfprintf(stderr, "\n***** ERROR TEST FAILED (real problem)! *****\n");
return 1;
}
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index 57847bb..8239207 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/extend.c b/test/extend.c
index 43fa076..2583de9 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, January 30, 1998
*
* Purpose: Tests extendible datasets.
@@ -22,11 +22,16 @@
const char *FILENAME[] = {"extend", NULL};
-#define NX 100 /* USE AN EVEN NUMBER!*/
-#define NY 100 /* USE AN EVEN NUMBER!*/
+#define N1X 100 /* USE AN EVEN NUMBER! */
+#define N1Y 100 /* USE AN EVEN NUMBER! */
+#define N2X (N1X / 2)
+#define N2Y (N1Y / 2)
/* Data buffers */
-static int buf1[NY][NX], buf2[NX / 2][NY / 2];
+static int **buf1 = NULL;
+static int * buf1_data = NULL;
+static int **buf2 = NULL;
+static int * buf2_data = NULL;
/*-------------------------------------------------------------------------
* Function: write_data
@@ -45,8 +50,8 @@ static int
write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t mem_space)
{
hid_t dataset, file_space, half_space;
- static const hsize_t dims[2] = {NX, NY};
- static const hsize_t half_dims[2] = {NX / 2, NY / 2};
+ static const hsize_t dims[2] = {N1X, N1Y};
+ static const hsize_t half_dims[2] = {N2X, N2Y};
hsize_t size[2];
hsize_t max_size[2] = {0, 0};
hsize_t offset[2];
@@ -63,10 +68,10 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
for (j = 0; j < 5; j++) {
/* Extend the dataset */
- offset[0] = (hsize_t)(i * NX);
- offset[1] = (hsize_t)(j * NY);
- size[0] = offset[0] + NX;
- size[1] = offset[1] + NY;
+ offset[0] = (hsize_t)(i * N1X);
+ offset[1] = (hsize_t)(j * N1Y);
+ size[0] = offset[0] + N1X;
+ size[1] = offset[1] + N1Y;
if (size[0] > max_size[0] || size[1] > max_size[1]) {
if (size[0] > max_size[0])
max_size[0] = size[0];
@@ -83,7 +88,7 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
TEST_ERROR;
/* Write to the hyperslab */
- if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1_data) < 0)
TEST_ERROR;
if (H5Sclose(file_space) < 0)
TEST_ERROR;
@@ -98,23 +103,23 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
for (j = 0; j < 10; j++) {
/* Select a hyperslab */
- offset[0] = (hsize_t)(i * (NX / 2));
- offset[1] = (hsize_t)(j * (NY / 2));
+ offset[0] = (hsize_t)(i * N2X);
+ offset[1] = (hsize_t)(j * N2Y);
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, half_dims, NULL) < 0)
TEST_ERROR;
/* Read */
- if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2_data) < 0)
TEST_ERROR;
/* Compare */
- for (k = 0; k < (NX / 2); k++)
- for (m = 0; m < (NY / 2); m++)
- if (buf2[k][m] != buf1[(i % 2) * (NX / 2) + k][(j % 2) * (NY / 2) + m]) {
+ for (k = 0; k < N2X; k++)
+ for (m = 0; m < N2Y; m++)
+ if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
HDprintf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
HDprintf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
- HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * (NX / 2) + k, (j % 2) * (NY / 2) + m,
- buf1[(i % 2) * (NX / 2) + k][(j % 2) * (NY / 2) + m]);
+ HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
+ buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
TEST_ERROR;
} /* end if */
} /* end for */
@@ -155,8 +160,8 @@ static int
write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t mem_space)
{
hid_t dataset, file_space, half_space;
- static const hsize_t dims[2] = {NX, NY};
- static const hsize_t half_dims[2] = {NX / 2, NY / 2};
+ static const hsize_t dims[2] = {N1X, N1Y};
+ static const hsize_t half_dims[2] = {N2X, N2Y};
static hsize_t size[2];
hsize_t offset[2];
int i, j, k, m;
@@ -172,10 +177,10 @@ write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, h
for (j = 0; j < 5; j++) {
/* Extend the dataset */
- offset[0] = (hsize_t)(i * NX);
- offset[1] = (hsize_t)(j * NY);
- size[0] = offset[0] + NX;
- size[1] = offset[1] + NY;
+ offset[0] = (hsize_t)(i * N1X);
+ offset[1] = (hsize_t)(j * N1Y);
+ size[0] = offset[0] + N1X;
+ size[1] = offset[1] + N1Y;
if (H5Dextend(dataset, size) < 0)
TEST_ERROR;
@@ -186,7 +191,7 @@ write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, h
TEST_ERROR;
/* Write to the hyperslab */
- if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1) < 0)
+ if (H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, buf1_data) < 0)
TEST_ERROR;
if (H5Sclose(file_space) < 0)
TEST_ERROR;
@@ -201,23 +206,23 @@ write_data_deprec(const char *msg, hid_t file, const char *name, hid_t cparms, h
for (j = 0; j < 10; j++) {
/* Select a hyperslab */
- offset[0] = (hsize_t)(i * (NX / 2));
- offset[1] = (hsize_t)(j * (NY / 2));
+ offset[0] = (hsize_t)(i * N2X);
+ offset[1] = (hsize_t)(j * N2Y);
if (H5Sselect_hyperslab(file_space, H5S_SELECT_SET, offset, NULL, half_dims, NULL) < 0)
TEST_ERROR;
/* Read */
- if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2) < 0)
+ if (H5Dread(dataset, H5T_NATIVE_INT, half_space, file_space, H5P_DEFAULT, buf2_data) < 0)
TEST_ERROR;
/* Compare */
- for (k = 0; k < (NX / 2); k++)
- for (m = 0; m < (NY / 2); m++)
- if (buf2[k][m] != buf1[(i % 2) * (NX / 2) + k][(j % 2) * (NY / 2) + m]) {
+ for (k = 0; k < N2X; k++)
+ for (m = 0; m < N2Y; m++)
+ if (buf2[k][m] != buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]) {
HDprintf(" i=%d, j=%d, k=%d, m=%d\n", i, j, k, m);
HDprintf(" buf2[%d][%d]=%d\n", k, m, buf2[k][m]);
- HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * (NX / 2) + k, (j % 2) * (NY / 2) + m,
- buf1[(i % 2) * (NX / 2) + k][(j % 2) * (NY / 2) + m]);
+ HDprintf(" buf1[%d][%d]=%d\n", (i % 2) * N2X + k, (j % 2) * N2Y + m,
+ buf1[(i % 2) * N2X + k][(j % 2) * N2Y + m]);
TEST_ERROR;
} /* end if */
} /* end for */
@@ -257,8 +262,8 @@ main(void)
hid_t file, mem_space, cparms;
hid_t fapl;
int nerrors = 0;
- static const hsize_t dims[2] = {NX, NY};
- static const hsize_t chunk_dims[2] = {NX / 2, NY / 2};
+ static const hsize_t dims[2] = {N1X, N1Y};
+ static const hsize_t chunk_dims[2] = {N2X, N2Y};
static hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
char filename[1024];
int i, j;
@@ -267,9 +272,23 @@ main(void)
fapl = h5_fileaccess();
/* Initialize buffer and space */
- for (i = 0; i < NX; i++)
- for (j = 0; j < NY; j++)
- buf1[i][j] = i * NY + j;
+ if (NULL == (buf1_data = (int *)HDcalloc(N1X * N1Y, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf1 = (int **)HDcalloc(N1X, sizeof(buf1_data))))
+ TEST_ERROR;
+ for (i = 0; i < N1X; i++)
+ buf1[i] = buf1_data + (i * N1Y);
+
+ if (NULL == (buf2_data = (int *)HDcalloc(N2X * N2Y, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf2 = (int **)HDcalloc(N2X, sizeof(buf2_data))))
+ TEST_ERROR;
+ for (i = 0; i < N2X; i++)
+ buf2[i] = buf2_data + (i * N2Y);
+
+ for (i = 0; i < N1X; i++)
+ for (j = 0; j < N1Y; j++)
+ buf1[i][j] = i * N1Y + j;
if ((mem_space = H5Screate_simple(2, dims, maxdims)) < 0)
TEST_ERROR;
@@ -327,9 +346,20 @@ main(void)
HDprintf("All extend tests passed.\n");
h5_cleanup(FILENAME, fapl);
+ HDfree(buf1);
+ HDfree(buf1_data);
+ HDfree(buf2);
+ HDfree(buf2_data);
+
HDexit(EXIT_SUCCESS);
error:
+
+ HDfree(buf1);
+ HDfree(buf1_data);
+ HDfree(buf2);
+ HDfree(buf2_data);
+
HDprintf("*** One or more extend tests failed ***\n");
HDexit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/external.c b/test/external.c
index dd88f84..c31701d 100644
--- a/test/external.c
+++ b/test/external.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, March 3, 1998
*
* Purpose: Tests datasets stored in external raw files.
@@ -72,7 +72,7 @@ files_have_same_contents(const char *name1, const char *name2)
break;
}
- if (HDmemcmp(buf1, buf2, (size_t)n1))
+ if (HDmemcmp(buf1, buf2, (size_t)n1) != 0)
break;
} /* end while */
@@ -474,7 +474,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-__add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, hsize_t max_ext_size)
+add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, hsize_t max_ext_size)
{
char exname[AEF_EXNAME_MAX_LEN + 1];
unsigned int i = 0;
@@ -485,12 +485,12 @@ __add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset,
for (i = 0; i < n_external_files; i++) {
if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
HDfprintf(stderr, "External file %d overflows name buffer\n", i + 1);
- fflush(stderr);
+ HDfflush(stderr);
return -1;
}
if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) {
HDfprintf(stderr, "Problem adding external file %s\n", exname);
- fflush(stderr);
+ HDfflush(stderr);
return -1;
}
}
@@ -528,7 +528,7 @@ test_multiple_files(hid_t file)
max_ext_size = (hsize_t)(sizeof(int) * max_size[0] / n_external_files);
- if (__add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) {
+ if (add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) {
FAIL_STACK_ERROR;
}
@@ -552,7 +552,7 @@ test_multiple_files(hid_t file)
max_ext_size -= 1;
- if (__add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) {
+ if (add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) {
FAIL_STACK_ERROR;
}
@@ -965,7 +965,7 @@ test_path_absolute(hid_t fapl)
hid_t dset = -1; /* dataset */
size_t i = 0; /* miscellaneous counter */
char cwdpath[1024]; /* working directory */
- char filename[1024]; /* file name */
+ char filename[1088]; /* file name */
int part[PART_SIZE]; /* raw data buffer (partial) */
int whole[TOTAL_SIZE]; /* raw data buffer (total) */
hsize_t cur_size; /* current data space size */
@@ -1059,7 +1059,6 @@ test_path_relative(hid_t fapl)
hid_t space = -1; /* data space */
hid_t dset = -1; /* dataset */
size_t i = 0; /* miscellaneous counters */
- char cwdpath[1024]; /* working directory */
char filename[1024]; /* file name */
int part[PART_SIZE]; /* raw data buffer (partial) */
int whole[TOTAL_SIZE]; /* raw data buffer (total) */
@@ -1084,8 +1083,6 @@ test_path_relative(hid_t fapl)
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
- if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
- TEST_ERROR
for (i = 0; i < N_EXT_FILES; i++) {
HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
@@ -1158,7 +1155,6 @@ test_path_relative_cwd(hid_t fapl)
hid_t dset2 = -1; /* dataset, opened a second time */
hid_t dset3 = -1; /* dataset, opened with different prefix */
size_t i = 0; /* miscellaneous counters */
- char cwdpath[1024]; /* working directory */
char filename[1024]; /* file name */
int part[PART_SIZE]; /* raw data buffer (partial) */
int whole[TOTAL_SIZE]; /* raw data buffer (total) */
@@ -1184,8 +1180,6 @@ test_path_relative_cwd(hid_t fapl)
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
- if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
- TEST_ERROR
for (i = 0; i < N_EXT_FILES; i++) {
HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
diff --git a/test/external_common.c b/test/external_common.c
index f4dbb4e..c37fd16 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* April, 2019
*
* Purpose: Private function for external.c and external_env.c
diff --git a/test/external_common.h b/test/external_common.h
index be5094f..6215be9 100644
--- a/test/external_common.h
+++ b/test/external_common.h
@@ -6,19 +6,19 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* April, 2019
*
* Purpose: Private function for external.c and external_env.c
*/
-#ifndef _EXTERNAL_COMMON_H
-#define _EXTERNAL_COMMON_H
+#ifndef EXTERNAL_COMMON_H
+#define EXTERNAL_COMMON_H
/* Include test header files */
#include "h5test.h"
@@ -41,4 +41,4 @@ H5TEST_DLL herr_t reset_raw_data_files(hbool_t is_env);
}
#endif
-#endif /* _EXTERNAL_COMMON_H */
+#endif /* EXTERNAL_COMMON_H */
diff --git a/test/external_env.c b/test/external_env.c
index a5c2bc0..5dc1d65 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -48,7 +48,6 @@ test_path_env(hid_t fapl)
hid_t dapl = -1; /* dataset access property list */
hid_t dset = -1; /* dataset */
size_t i; /* miscellaneous counters */
- char cwdpath[1024]; /* working directory */
char filename[1024]; /* file name */
int part[PART_SIZE]; /* raw data buffer (partial) */
int whole[TOTAL_SIZE]; /* raw data buffer (total) */
@@ -71,8 +70,6 @@ test_path_env(hid_t fapl)
/* Create the dataset */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
- if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
- TEST_ERROR
for (i = 0; i < N_EXT_FILES; i++) {
HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
diff --git a/test/external_fname.h b/test/external_fname.h
index 05433e6..c2cd059 100644
--- a/test/external_fname.h
+++ b/test/external_fname.h
@@ -6,19 +6,19 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@lbl.gov>
+ * Programmer: Quincey Koziol
* July, 2019
*
* Purpose: Private declaration for external.c and external_env.c
*/
-#ifndef _EXTERNAL_FNAME_H
-#define _EXTERNAL_FNAME_H
+#ifndef EXTERNAL_FNAME_H
+#define EXTERNAL_FNAME_H
/* Include test header files */
#include "h5test.h"
@@ -26,4 +26,4 @@
static const char *EXT_FNAME[] = {"extern_1", "extern_2", "extern_3", "extern_4",
"extern_dir/file_1", "extern_5", NULL};
-#endif /* _EXTERNAL_FNAME_H */
+#endif /* EXTERNAL_FNAME_H */
diff --git a/test/farray.c b/test/farray.c
index 8f93756..fdf384b 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -178,20 +178,20 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
/* Compare information */
if (farray_stats.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n", farray_stats.hdr_size,
- state->hdr_size);
+ HDfprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
+ farray_stats.hdr_size, state->hdr_size);
TEST_ERROR
}
if (farray_stats.dblk_size != state->dblk_size) {
- HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n", farray_stats.dblk_size,
- state->dblk_size);
+ HDfprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n",
+ farray_stats.dblk_size, state->dblk_size);
TEST_ERROR
}
if (farray_stats.nelmts != state->nelmts) {
- HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n", farray_stats.nelmts,
- state->nelmts);
+ HDfprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
+ farray_stats.nelmts, state->nelmts);
TEST_ERROR
}
@@ -488,11 +488,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
} /* end if */
- PASSED()
+ PASSED();
}
#else /* NDEBUG */
SKIPPED();
- puts(" Not tested when assertions are disabled");
+ HDputs(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -504,7 +504,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
if (create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Verify the creation parameters */
TESTING("verify array creation parameters");
@@ -518,7 +518,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -586,7 +586,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -686,7 +686,7 @@ test_open_twice(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -820,7 +820,7 @@ test_open_twice_diff(hid_t fapl_id, H5FA_create_t *cparam, farray_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -943,7 +943,7 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1471,7 +1471,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1599,7 +1599,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
diff --git a/test/fheap.c b/test/fheap.c
index b7da98b..96293fa 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Friday, February 24, 2006
*/
#include "h5test.h"
@@ -20,9 +20,9 @@
* This file needs to access private datatypes from the H5HF package.
* This file also needs to access the fractal heap testing code.
*/
-#define H5HF_FRIEND /*suppress error about including H5HFpkg */
+#define H5HF_FRIEND /*suppress error about including H5HFpkg */
#define H5HF_TESTING
-#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5HFpkg.h" /* Fractal heaps */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
@@ -30,9 +30,9 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Max. testfile name length */
#define FHEAP_FILENAME_LEN 1024
@@ -69,19 +69,22 @@
/* #define ALL_INSERT_TESTS */
/* Heap metadata macros */
-#define MAX_HEAP_ID_LEN 64 /* Max. # of bytes to use for heap ID */
-#define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */
-#define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */
-#define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */
-#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh) /* Max. # of rows in root indirect block */
-#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh) /* Width of doubling table for heap */
-#define DTABLE_MAX_DROWS(fh) \
- H5HF_get_dtable_max_drows_test(fh) /* Max. # of direct block rows in any indirect block */
-#define IBLOCK_MAX_DROWS(fh, pos) \
- H5HF_get_iblock_max_drows_test(fh, pos) /* Max. # of direct block rows in a indirect block */
-#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) /* Size of a direct block in a given row */
-#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row \
- */
+#define MAX_HEAP_ID_LEN 64 /* Max. # of bytes to use for heap ID */
+#define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */
+#define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */
+#define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */
+/* Max. # of rows in root indirect block */
+#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh)
+/* Width of doubling table for heap */
+#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh)
+/* Max. # of direct block rows in any indirect block */
+#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh)
+/* Max. # of direct block rows in a indirect block */
+#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos)
+/* Size of a direct block in a given row */
+#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r)
+/* Free space in a direct block of a given row */
+#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r)
/* The number of settings for testing: page buffering, file space strategy and persisting free-space */
#define NUM_PB_FS 6
@@ -175,16 +178,16 @@ static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_hea
fheap_heap_ids_t *keep_ids);
/*-------------------------------------------------------------------------
- * Function: init_small_cparam
+ * Function: init_small_cparam
*
- * Purpose: Initialize heap creation parameter structure with small
+ * Purpose: Initialize heap creation parameter structure with small
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -211,16 +214,16 @@ init_small_cparam(H5HF_create_t *cparam)
} /* init_small_cparam() */
/*-------------------------------------------------------------------------
- * Function: init_large_cparam
+ * Function: init_large_cparam
*
- * Purpose: Initialize heap creation parameter structure with large
+ * Purpose: Initialize heap creation parameter structure with large
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -247,15 +250,15 @@ init_large_cparam(H5HF_create_t *cparam)
} /* init_large_cparam() */
/*-------------------------------------------------------------------------
- * Function: check_stats
+ * Function: check_stats
*
- * Purpose: Verify stats for a heap
+ * Purpose: Verify stats for a heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -269,43 +272,45 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state)
if (H5HF_stat_info(fh, &heap_stats) < 0)
FAIL_STACK_ERROR
if (heap_stats.man_nobjs != state->man_nobjs) {
- HDfprintf(stdout, "heap_stats.man_nobjs = %Hu, state->man_nobjs = %Zu\n", heap_stats.man_nobjs,
- state->man_nobjs);
+ HDfprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n",
+ heap_stats.man_nobjs, state->man_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.man_size != state->man_size) {
- HDfprintf(stdout, "heap_stats.man_size = %Hu, state->man_size = %Hu\n", heap_stats.man_size,
- state->man_size);
+ HDfprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n",
+ heap_stats.man_size, state->man_size);
TEST_ERROR
} /* end if */
if (heap_stats.man_alloc_size != state->man_alloc_size) {
- HDfprintf(stdout, "heap_stats.man_alloc_size = %Hu, state->man_alloc_size = %Hu\n",
+ HDfprintf(stdout,
+ "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n",
heap_stats.man_alloc_size, state->man_alloc_size);
TEST_ERROR
} /* end if */
if (heap_stats.man_free_space != state->man_free_space) {
- HDfprintf(stdout, "heap_stats.man_free_space = %Hu, state->man_free_space = %Hu\n",
+ HDfprintf(stdout,
+ "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n",
heap_stats.man_free_space, state->man_free_space);
TEST_ERROR
} /* end if */
if (heap_stats.huge_nobjs != state->huge_nobjs) {
- HDfprintf(stdout, "heap_stats.huge_nobjs = %Hu, state->huge_nobjs = %Zu\n", heap_stats.huge_nobjs,
- state->huge_nobjs);
+ HDfprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n",
+ heap_stats.huge_nobjs, state->huge_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.huge_size != state->huge_size) {
- HDfprintf(stdout, "heap_stats.huge_size = %Hu, state->huge_size = %Hu\n", heap_stats.huge_size,
- state->huge_size);
+ HDfprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n",
+ heap_stats.huge_size, state->huge_size);
TEST_ERROR
} /* end if */
if (heap_stats.tiny_nobjs != state->tiny_nobjs) {
- HDfprintf(stdout, "heap_stats.tiny_nobjs = %Hu, state->tiny_nobjs = %Zu\n", heap_stats.tiny_nobjs,
- state->tiny_nobjs);
+ HDfprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n",
+ heap_stats.tiny_nobjs, state->tiny_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.tiny_size != state->tiny_size) {
- HDfprintf(stdout, "heap_stats.tiny_size = %Hu, state->tiny_size = %Hu\n", heap_stats.tiny_size,
- state->tiny_size);
+ HDfprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n",
+ heap_stats.tiny_size, state->tiny_size);
TEST_ERROR
} /* end if */
@@ -317,15 +322,15 @@ error:
} /* check_stats() */
/*-------------------------------------------------------------------------
- * Function: op_memcpy
+ * Function: op_memcpy
*
- * Purpose: Perform 'memcpy' for an object
+ * Purpose: Perform 'memcpy' for an object
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, September 11, 2006
*
*-------------------------------------------------------------------------
@@ -340,9 +345,9 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
} /* op_memcpy() */
/*-------------------------------------------------------------------------
- * Function: add_obj
+ * Function: add_obj
*
- * Purpose: Add an object to heap
+ * Purpose: Add an object to heap
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ any block created for the object:
@@ -354,11 +359,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
* the current state, before any block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -419,7 +424,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
TEST_ERROR
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(obj, shared_robj_g, obj_size))
+ if (HDmemcmp(obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* If the heap IDs are to be retained, append them to the list */
@@ -462,15 +467,15 @@ error:
} /* add_obj() */
/*-------------------------------------------------------------------------
- * Function: get_del_string
+ * Function: get_del_string
*
- * Purpose: Return string describing the kind of deletion to perform
+ * Purpose: Return string describing the kind of deletion to perform
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -498,14 +503,14 @@ get_del_string(const fheap_test_param_t *tparam)
} /* get_del_string() */
/*-------------------------------------------------------------------------
- * Function: get_fill_size
+ * Function: get_fill_size
*
- * Purpose: Retrieve the size of objects to "bulk" fill blocks with
+ * Purpose: Retrieve the size of objects to "bulk" fill blocks with
*
- * Return: Size of object to pass down to "fill_heap" routine on
+ * Return: Size of object to pass down to "fill_heap" routine on
* success/can't fail
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 27, 2006
*
*-------------------------------------------------------------------------
@@ -529,15 +534,15 @@ get_fill_size(const fheap_test_param_t *tparam)
} /* get_fill_size() */
/*-------------------------------------------------------------------------
- * Function: begin_test
+ * Function: begin_test
*
- * Purpose: Perform common "test being" operations
+ * Purpose: Perform common "test being" operations
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -548,7 +553,7 @@ get_fill_size(const fheap_test_param_t *tparam)
* test_desc in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *keep_ids, size_t *fill_size)
{
@@ -576,17 +581,17 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
/* Success */
return (0);
} /* end begin_test() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
- * Function: reopen_file
+ * Function: reopen_file
*
- * Purpose: Perform common "re-open" operations on file & heap for testing
+ * Purpose: Perform common "re-open" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -634,15 +639,15 @@ error:
} /* end reopen_file() */
/*-------------------------------------------------------------------------
- * Function: open_heap
+ * Function: open_heap
*
- * Purpose: Perform common "open" operations on file & heap for testing
+ * Purpose: Perform common "open" operations on file & heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -745,15 +750,15 @@ error:
} /* end open_heap() */
/*-------------------------------------------------------------------------
- * Function: reopen_heap
+ * Function: reopen_heap
*
- * Purpose: Perform common "re-open" operations on heap for testing
+ * Purpose: Perform common "re-open" operations on heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -781,14 +786,14 @@ error:
} /* end reopen_heap() */
/*-------------------------------------------------------------------------
- * Function: close_heap
+ * Function: close_heap
*
- * Purpose: Perform common "close" operations on file & heap for testing
+ * Purpose: Perform common "close" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -846,15 +851,15 @@ error:
} /* end close_heap() */
/*-------------------------------------------------------------------------
- * Function: del_objs_half_refill
+ * Function: del_objs_half_refill
*
- * Purpose: Remove half of objects from heap and refill
+ * Purpose: Remove half of objects from heap and refill
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -938,15 +943,15 @@ error:
} /* del_objs_half_refill() */
/*-------------------------------------------------------------------------
- * Function: del_objs
+ * Function: del_objs
*
- * Purpose: Remove objects from heap
+ * Purpose: Remove objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -1019,9 +1024,9 @@ error:
} /* del_objs() */
/*-------------------------------------------------------------------------
- * Function: fill_heap
+ * Function: fill_heap
*
- * Purpose: Insert (small) objects to fill up the free space in a heap block
+ * Purpose: Insert (small) objects to fill up the free space in a heap block
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ the block has been created:
@@ -1033,11 +1038,11 @@ error:
* the current state, before the block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -1187,7 +1192,7 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s
/* Check that object is correct */
wobj = &shared_wobj_g[*curr_off_ptr];
- if (HDmemcmp(wobj, shared_robj_g, *curr_len_ptr))
+ if (HDmemcmp(wobj, shared_robj_g, *curr_len_ptr) != 0)
TEST_ERROR
/* Adjust object & ID pointers */
@@ -1229,15 +1234,15 @@ error:
} /* fill_heap() */
/*-------------------------------------------------------------------------
- * Function: fill_root_row
+ * Function: fill_root_row
*
- * Purpose: Fill up a row of direct blocks in the root indirect block
+ * Purpose: Fill up a row of direct blocks in the root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1325,15 +1330,15 @@ error:
} /* fill_root_row() */
/*-------------------------------------------------------------------------
- * Function: fill_partial row
+ * Function: fill_partial row
*
- * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
+ * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -1370,15 +1375,15 @@ error:
} /* fill_partial_row() */
/*-------------------------------------------------------------------------
- * Function: fill_row
+ * Function: fill_row
*
- * Purpose: Fill up entire row of direct blocks in an non-root indirect block
+ * Purpose: Fill up entire row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1402,18 +1407,18 @@ error:
} /* fill_row() */
/*-------------------------------------------------------------------------
- * Function: fill_root_direct
+ * Function: fill_root_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in the root indirect block
* (Generally used to create & fill up direct blocks in a new
* indirect block)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -1441,17 +1446,17 @@ error:
} /* fill_root_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect
+ * Function: fill_2nd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a second-level indirect block (which only has
* direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1480,16 +1485,16 @@ error:
} /* fill_2nd_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_all_direct
+ * Function: fill_all_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks up to the maximum direct block size
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1517,17 +1522,17 @@ error:
} /* fill_all_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect_row
+ * Function: fill_2nd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of second-level indirect block (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1555,17 +1560,17 @@ error:
} /* fill_2nd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_2nd_indirect_rows
+ * Function: fill_all_2nd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of second-level indirect blocks (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1592,17 +1597,17 @@ error:
} /* fill_2nd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect
+ * Function: fill_3rd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a third-level indirect block (which
* has one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -1630,17 +1635,17 @@ error:
} /* fill_3rd_indirect() */
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect_row
+ * Function: fill_3rd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of third-level indirect block (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1669,17 +1674,17 @@ error:
} /* fill_3rd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_3rd_indirect_rows
+ * Function: fill_all_3rd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of third-level indirect blocks (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1707,17 +1712,17 @@ error:
} /* fill_all_3rd_direct_rows() */
/*-------------------------------------------------------------------------
- * Function: fill_4th_indirect_row
+ * Function: fill_4th_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1756,17 +1761,17 @@ error:
} /* fill_4th_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_4th_indirect_rows
+ * Function: fill_all_4th_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1812,14 +1817,14 @@ error:
} /* fill_all_4th_direct_rows() */
/*-------------------------------------------------------------------------
- * Function: test_create
+ * Function: test_create
*
- * Purpose: Create fractal heap
+ * Purpose: Create fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -1883,7 +1888,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
HDmemset(&state, 0, sizeof(fheap_heap_state_t));
if (check_stats(fh, &state))
TEST_ERROR
- PASSED()
+ PASSED();
/* Query the type of address mapping */
TESTING("query heap creation parameters");
@@ -1915,7 +1920,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -1931,14 +1936,14 @@ error:
} /* test_create() */
/*-------------------------------------------------------------------------
- * Function: test_reopen
+ * Function: test_reopen
*
- * Purpose: Create & reopen a fractal heap
+ * Purpose: Create & reopen a fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -2068,7 +2073,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -2084,14 +2089,14 @@ error:
} /* test_reopen() */
/*-------------------------------------------------------------------------
- * Function: test_open_twice
+ * Function: test_open_twice
*
- * Purpose: Open a fractal heap twice
+ * Purpose: Open a fractal heap twice
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -2242,7 +2247,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2262,14 +2267,14 @@ error:
} /* test_open_twice() */
/*-------------------------------------------------------------------------
- * Function: test_delete_open
+ * Function: test_delete_open
*
- * Purpose: Delete opened fractal heap (& open deleted heap)
+ * Purpose: Delete opened fractal heap (& open deleted heap)
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, January 5, 2007
*
*-------------------------------------------------------------------------
@@ -2422,7 +2427,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2440,14 +2445,14 @@ error:
} /* test_delete_open() */
/*-------------------------------------------------------------------------
- * Function: test_id_limits
+ * Function: test_id_limits
*
- * Purpose: Test limits for heap ID lengths
+ * Purpose: Test limits for heap ID lengths
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2762,7 +2767,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2778,14 +2783,14 @@ error:
} /* test_id_limits() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_create
+ * Function: test_filtered_create
*
- * Purpose: Test creating a heap with I/O filters
+ * Purpose: Test creating a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2884,7 +2889,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
H5O_msg_reset(H5O_PLINE_ID, &test_cparam.pline);
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -2900,14 +2905,14 @@ error:
} /* test_filtered_create() */
/*-------------------------------------------------------------------------
- * Function: test_size
+ * Function: test_size
*
- * Purpose: Test querying heap size
+ * Purpose: Test querying heap size
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 14, 2007
*
*-------------------------------------------------------------------------
@@ -3023,7 +3028,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return 0;
@@ -3157,7 +3162,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3173,17 +3178,15 @@ error:
return (1);
} /* test_reopen_hdr() */
-#ifndef QAK2
-
/*-------------------------------------------------------------------------
- * Function: test_man_insert_weird
+ * Function: test_man_insert_weird
*
- * Purpose: Test inserting "weird" sized objects into absolute heap
+ * Purpose: Test inserting "weird" sized objects into absolute heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -3272,7 +3275,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3290,15 +3293,15 @@ error:
#ifdef ALL_INSERT_TESTS
/*-------------------------------------------------------------------------
- * Function: test_man_insert_first
+ * Function: test_man_insert_first
*
- * Purpose: Test inserting first object into absolute heap
+ * Purpose: Test inserting first object into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -3375,7 +3378,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3391,15 +3394,15 @@ error:
} /* test_man_insert_first() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_second
+ * Function: test_man_insert_second
*
- * Purpose: Test inserting two objects into absolute heap
+ * Purpose: Test inserting two objects into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3470,7 +3473,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3486,16 +3489,16 @@ error:
} /* test_man_insert_second() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_root_mult
+ * Function: test_man_insert_root_mult
*
- * Purpose: Test inserting mult. objects into absolute heap, up to the
+ * Purpose: Test inserting mult. objects into absolute heap, up to the
* limit of a root direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3568,7 +3571,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3584,17 +3587,17 @@ error:
} /* test_man_insert_root_mult() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_force_indirect
+ * Function: test_man_insert_force_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block and forcing the root block to be converted
* into an indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3674,7 +3677,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3690,17 +3693,17 @@ error:
} /* test_man_insert_force_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_fill_second
+ * Function: test_man_insert_fill_second
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block and filling the secnod indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3780,7 +3783,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3796,18 +3799,18 @@ error:
} /* test_man_insert_fill_second() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_third_direct
+ * Function: test_man_insert_third_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block, filling the secnod indirect block and
* creating a third direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3892,7 +3895,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -3908,17 +3911,17 @@ error:
} /* test_man_insert_third_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_row
+ * Function: test_man_fill_first_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 13, 2006
*
*-------------------------------------------------------------------------
@@ -3988,7 +3991,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4004,17 +4007,17 @@ error:
} /* test_man_fill_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_second_row
+ * Function: test_man_start_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then add another object to start second row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4091,7 +4094,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4107,17 +4110,17 @@ error:
} /* test_man_start_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_row
+ * Function: test_man_fill_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then fill the second row also.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4191,7 +4194,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4207,18 +4210,18 @@ error:
} /* test_man_fill_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_third_row
+ * Function: test_man_start_third_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, fill the second row also, then add another object to
* start the third row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4302,7 +4305,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4318,17 +4321,17 @@ error:
} /* test_man_start_third_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_fourth_row
+ * Function: test_man_fill_fourth_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first four rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4400,7 +4403,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4416,17 +4419,17 @@ error:
} /* test_man_fill_fourth_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_root_direct
+ * Function: test_man_fill_all_root_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4496,7 +4499,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4512,17 +4515,17 @@ error:
} /* test_man_fill_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_first_recursive_indirect
+ * Function: test_man_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block and create first recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4597,7 +4600,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4613,18 +4616,18 @@ error:
} /* test_man_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_second_direct_recursive_indirect
+ * Function: test_man_second_direct_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and start second
* direct block in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4707,7 +4710,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4723,18 +4726,18 @@ error:
} /* test_man_second_direct_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_recursive_indirect
+ * Function: test_man_fill_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and filling all
* direct blocks in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4809,7 +4812,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4825,19 +4828,19 @@ error:
} /* test_man_fill_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_second_recursive_indirect
+ * Function: test_man_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and adding another
* object to force creation of second recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4919,7 +4922,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -4935,20 +4938,20 @@ error:
} /* test_man_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_recursive_indirect
+ * Function: test_man_fill_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -5027,7 +5030,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5043,20 +5046,20 @@ error:
} /* test_man_fill_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_recursive_indirect_row
+ * Function: test_man_fill_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -5127,7 +5130,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5143,18 +5146,18 @@ error:
} /* test_man_fill_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_2nd_recursive_indirect
+ * Function: test_man_start_2nd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the first row of indirect
* blocks and start on first block in second row of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5236,7 +5239,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5252,18 +5255,18 @@ error:
} /* test_man_start_2nd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_recursive_indirect_two_deep
+ * Function: test_man_recursive_indirect_two_deep
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5338,7 +5341,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5354,19 +5357,19 @@ error:
} /* test_man_recursive_indirect_two_deep() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_3rd_recursive_indirect
+ * Function: test_man_start_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and start first direct block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5448,7 +5451,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5464,19 +5467,19 @@ error:
} /* test_man_start_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_3rd_recursive_indirect
+ * Function: test_man_fill_first_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill first indirect block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5559,7 +5562,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5575,19 +5578,19 @@ error:
} /* test_man_fill_first_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_recursive_indirect_row
+ * Function: test_man_fill_3rd_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* first row of 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5667,7 +5670,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5683,19 +5686,19 @@ error:
} /* test_man_fill_3rd_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_3rd_recursive_indirect
+ * Function: test_man_fill_all_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* that are three levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5775,7 +5778,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5791,20 +5794,20 @@ error:
} /* test_man_fill_all_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_4th_recursive_indirect
+ * Function: test_man_start_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and start first direct block that
* is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5890,7 +5893,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -5906,20 +5909,20 @@ error:
} /* test_man_start_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_4th_recursive_indirect
+ * Function: test_man_fill_first_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first (3rd level)
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6011,7 +6014,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6027,20 +6030,20 @@ error:
} /* test_man_fill_first_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_4th_recursive_indirect_row
+ * Function: test_man_fill_4th_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first row of
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6123,7 +6126,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6139,20 +6142,20 @@ error:
} /* test_man_fill_4th_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_4th_recursive_indirect
+ * Function: test_man_fill_all_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill all rows of
* indirect blocks that are four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6235,7 +6238,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6251,12 +6254,10 @@ error:
} /* test_man_fill_all_4th_recursive_indirect() */
#endif /* ALL_INSERT_TESTS */
-#ifndef QAK
-
/*-------------------------------------------------------------------------
- * Function: test_man_start_5th_recursive_indirect
+ * Function: test_man_start_5th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
@@ -6264,11 +6265,11 @@ error:
* that are four levels deep and start first direct block in
* indirect blocks five levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6371,7 +6372,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6385,20 +6386,17 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_start_5th_recursive_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_remove_bogus
+ * Function: test_man_remove_bogus
*
- * Purpose: Test removing bogus heap IDs
+ * Purpose: Test removing bogus heap IDs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6464,10 +6462,10 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1155438845; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1155438845; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Set heap ID to random (non-null) value */
@@ -6533,7 +6531,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6550,15 +6548,15 @@ error:
} /* test_man_remove_bogus() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one
+ * Function: test_man_remove_one
*
- * Purpose: Test removing single object from heap
+ * Purpose: Test removing single object from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6698,7 +6696,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6714,15 +6712,15 @@ error:
} /* test_man_remove_one() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two
+ * Function: test_man_remove_two
*
- * Purpose: Test removing two objects from heap
+ * Purpose: Test removing two objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -6891,7 +6889,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -6907,16 +6905,16 @@ error:
} /* test_man_remove_two() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one_larger
+ * Function: test_man_remove_one_larger
*
- * Purpose: Test removing single larger (but < standalone size) object
+ * Purpose: Test removing single larger (but < standalone size) object
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -7060,7 +7058,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7076,16 +7074,16 @@ error:
} /* test_man_remove_one_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_larger
+ * Function: test_man_remove_two_larger
*
- * Purpose: Test removing two larger (but < standalone size) objects
+ * Purpose: Test removing two larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, June 10, 2006
*
*-------------------------------------------------------------------------
@@ -7295,16 +7293,12 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
- /* Verify the file is correct size */
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
+ /* Verify the file is correct size */
if (file_size != empty_size)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7320,16 +7314,16 @@ error:
} /* test_man_remove_two_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_three_larger
+ * Function: test_man_remove_three_larger
*
- * Purpose: Test removing three larger (but < standalone size) objects
+ * Purpose: Test removing three larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -7599,16 +7593,12 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
- /* Verify the file is correct size */
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
+ /* Verify the file is correct size */
if (file_size != empty_size)
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7624,14 +7614,14 @@ error:
} /* test_man_remove_three_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_incr_insert_remove
+ * Function: test_man_incr_insert_remove
*
- * Purpose: Test incremental insert & removal of objects in heap
+ * Purpose: Test incremental insert & removal of objects in heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, April 1, 2012
*
*-------------------------------------------------------------------------
@@ -7639,12 +7629,13 @@ error:
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 */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t * f = NULL; /* Internal file object pointer */
- H5HF_t * fh = NULL; /* Fractal heap wrapper */
- haddr_t fh_addr; /* Address of fractal heap */
- unsigned char heap_id[100][MAX_HEAP_ID_LEN]; /* Heap ID for object inserted */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t * f = NULL; /* Internal file object pointer */
+ H5HF_t * fh = NULL; /* Fractal heap wrapper */
+ haddr_t fh_addr; /* Address of fractal heap */
+ unsigned char **heap_id = NULL;
+ unsigned char * heap_id_data = NULL;
struct a_type_t1 {
char a[10];
char b[40];
@@ -7656,6 +7647,14 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
+ /* Set up data array */
+ if (NULL == (heap_id_data = (unsigned char *)HDcalloc(100 * MAX_HEAP_ID_LEN, sizeof(unsigned char))))
+ TEST_ERROR;
+ if (NULL == (heap_id = (unsigned char **)HDcalloc(100, sizeof(heap_id_data))))
+ TEST_ERROR;
+ for (i = 0; i < 100; i++)
+ heap_id[i] = heap_id_data + (i * MAX_HEAP_ID_LEN);
+
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, tparam->my_fcpl, fapl)) < 0)
FAIL_STACK_ERROR
@@ -7720,9 +7719,12 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR
/* All tests passed */
- PASSED()
+ PASSED();
- return (0);
+ HDfree(heap_id);
+ HDfree(heap_id_data);
+
+ return 0;
error:
H5E_BEGIN_TRY
@@ -7732,23 +7734,24 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- return (1);
-} /* test_man_incr_insert_remove() */
-#endif /* QAK */
-#ifndef QAK
+ HDfree(heap_id);
+ HDfree(heap_id_data);
+
+ return 1;
+} /* test_man_incr_insert_remove() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_root_direct
+ * Function: test_man_remove_root_direct
*
- * Purpose: Test filling and removing all objects from root direct block in
+ * Purpose: Test filling and removing all objects from root direct block in
* heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7765,8 +7768,8 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from root direct block of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from root direct block of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7793,7 +7796,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7812,16 +7815,16 @@ error:
} /* test_man_remove_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_direct
+ * Function: test_man_remove_two_direct
*
- * Purpose: Test filling and removing all objects from (first) two direct
+ * Purpose: Test filling and removing all objects from (first) two direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7838,8 +7841,8 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from two direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from two direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7881,7 +7884,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7900,16 +7903,16 @@ error:
} /* test_man_remove_two_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_row
+ * Function: test_man_remove_first_row
*
- * Purpose: Test filling and removing all objects from first row of direct
+ * Purpose: Test filling and removing all objects from first row of direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 5, 2006
*
*-------------------------------------------------------------------------
@@ -7926,8 +7929,8 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first row of direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7951,7 +7954,7 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -7970,16 +7973,16 @@ error:
} /* test_man_remove_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_two_rows
+ * Function: test_man_remove_first_two_rows
*
- * Purpose: Test filling and removing all objects from first two rows of
+ * Purpose: Test filling and removing all objects from first two rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -7996,9 +7999,8 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first two rows of direct blocks of absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8024,7 +8026,7 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8043,16 +8045,16 @@ error:
} /* test_man_remove_first_two_rows() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_four_rows
+ * Function: test_man_remove_first_four_rows
*
- * Purpose: Test filling and removing all objects from first four rows of
+ * Purpose: Test filling and removing all objects from first four rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8069,9 +8071,8 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first four rows of direct blocks of absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8101,7 +8102,7 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8120,16 +8121,16 @@ error:
} /* test_man_remove_first_four_rows() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_all_root_direct
+ * Function: test_man_remove_all_root_direct
*
- * Purpose: Test filling and removing all objects from all direct blocks
+ * Purpose: Test filling and removing all objects from all direct blocks
* in root indirect block of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8146,9 +8147,8 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from all direct blocks of root group in absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8172,7 +8172,7 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8191,16 +8191,16 @@ error:
} /* test_man_remove_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_2nd_indirect
+ * Function: test_man_remove_2nd_indirect
*
- * Purpose: Test filling and removing all objects up to 2nd level indirect
+ * Purpose: Test filling and removing all objects up to 2nd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8217,8 +8217,8 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from 2nd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8246,7 +8246,7 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8265,16 +8265,16 @@ error:
} /* test_man_remove_2nd_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_3rd_indirect
+ * Function: test_man_remove_3rd_indirect
*
- * Purpose: Test filling and removing all objects up to 3rd level indirect
+ * Purpose: Test filling and removing all objects up to 3rd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -8291,8 +8291,8 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from 3rd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8324,7 +8324,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8341,24 +8341,21 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_remove_3rd_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block
+ * Function: test_man_skip_start_block
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -8375,9 +8372,9 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "inserting object that is too large for starting block, then remove all objects %s"; /* Test
- description */
+ /* Test description */
+ const char *base_desc =
+ "inserting object that is too large for starting block, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8408,7 +8405,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8427,17 +8424,17 @@ error:
} /* test_man_skip_start_block() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_back
+ * Function: test_man_skip_start_block_add_back
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add object which fits in skipped direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8454,10 +8451,9 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "skipping starting block, then adding object back to first block, then remove all objects %s"; /* Test
- description
- */
+ /* Test description */
+ const char *base_desc =
+ "skipping starting block, then adding object back to first block, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8507,7 +8503,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8526,18 +8522,18 @@ error:
} /* test_man_skip_start_block_add_back() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_skipped
+ * Function: test_man_skip_start_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add objects to fill skipped direct blocks
* and add another object to start on next "normal" block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8555,8 +8551,9 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then "
- "remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc =
+ "skipping starting block, then adding objects to backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8616,7 +8613,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8635,18 +8632,18 @@ error:
} /* test_man_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block
+ * Function: test_man_skip_2nd_block
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8663,8 +8660,9 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
+ /* Test description */
const char *base_desc = "insert object to initial block, then add object too large for starting direct "
- "blocks, then remove all objects %s"; /* Test description */
+ "blocks, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8709,7 +8707,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8728,9 +8726,9 @@ error:
} /* test_man_skip_2nd_block() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block_add_skipped
+ * Function: test_man_skip_2nd_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks).
@@ -8738,11 +8736,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8760,10 +8758,10 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "insert object to initial block, then add object too large for starting direct blocks, then backfill "
- "and extend, then remove all objects %s"; /* Test description */
- unsigned v; /* Local index variables */
+ unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "insert object to initial block, then add object too large for starting direct "
+ "blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8852,7 +8850,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -8871,9 +8869,9 @@ error:
} /* test_man_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
+ * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
*
- * Purpose: Test filling initial direct block, then add object small enough
+ * Purpose: Test filling initial direct block, then add object small enough
* for initial block size (to create root indirect block), then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
@@ -8883,11 +8881,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -8906,11 +8904,10 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; /* Test
- description
- */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc =
+ "skipping blocks with indirect root, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9021,7 +9018,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9040,9 +9037,9 @@ error:
} /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_row_skip_add_skipped
+ * Function: test_man_fill_row_skip_add_skipped
*
- * Purpose: Test filling first row of direct blocks, then
+ * Purpose: Test filling first row of direct blocks, then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
* of skipped blocks).
@@ -9051,11 +9048,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -9073,10 +9070,9 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; /* Test
- description
- */
+ /* Test description */
+ const char *base_desc =
+ "filling first row, then skipping rows, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9152,7 +9148,7 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9171,19 +9167,19 @@ error:
} /* test_man_fill_row_skip_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test adding object too large for all but the last row in the
+ * Purpose: Test adding object too large for all but the last row in the
* direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9203,10 +9199,10 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned v; /* Local index variables */
+ unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect "
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -9281,7 +9277,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9300,18 +9296,18 @@ error:
} /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first row of direct
* blocks in indirect block, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9330,8 +9326,9 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
+ /* Test description */
const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9404,7 +9401,7 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9423,19 +9420,19 @@ error:
} /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then backfill all direct blocks
* skipped and extend to next "normal" direct block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9450,16 +9447,17 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
H5HF_t * fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
- unsigned
- num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */
- unsigned row; /* Current row in indirect block */
- h5_stat_size_t empty_size; /* Size of a file with an empty heap */
- size_t obj_size; /* Size of object */
- size_t fill_size; /* Size of objects for "bulk" filled blocks */
- fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variable */
+ unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */
+ /* first indirect blocks */
+ unsigned row; /* Current row in indirect block */
+ h5_stat_size_t empty_size; /* Size of a file with an empty heap */
+ size_t obj_size; /* Size of object */
+ size_t fill_size; /* Size of objects for "bulk" filled blocks */
+ fheap_heap_state_t state; /* State of fractal heap */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then "
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9534,7 +9532,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9553,20 +9551,20 @@ error:
} /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, except the last
* one, then insert object insert object that is too large to
* hold in row of 2nd level indirect blocks (forcing the use of
* the next row of 2nd level blocks), then backfill all skipped
* direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -9587,12 +9585,11 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too "
- "large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test
- description
- */
- unsigned u; /* Local index variables */
+ "large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9628,9 +9625,6 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9681,7 +9675,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9700,9 +9694,9 @@ error:
} /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then add object that is too
@@ -9712,11 +9706,11 @@ error:
* too large for initial block size in skipped indirect block
* row's direct blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -9738,10 +9732,10 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, "
- "then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip "
+ "row of direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9767,9 +9761,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9789,9 +9780,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
/* Insert object too large for initial block size in skipped indirect blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
if (add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9802,9 +9790,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
/* Insert object to fill space in (medium) block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 4) - obj_size;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9858,7 +9843,7 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -9877,18 +9862,18 @@ error:
} /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9910,9 +9895,10 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "filling direct blocks and skipping two rows of root indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then "
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10011,7 +9997,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10030,20 +10016,20 @@ error:
} /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block, then add object too large for first row of
* indirect blocks, (and ranges of skipped blocks), then backfill
* and extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -10065,10 +10051,11 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10195,7 +10182,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10214,19 +10201,19 @@ error:
} /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, the insert object
* that is too large to hold in first row of direct blocks of
* 3rd level indirect block, then backfill & extend all skipped
* 3rd level indirect block's direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10245,10 +10232,10 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of "
- "3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description
- */
+ "3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10324,7 +10311,7 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10343,9 +10330,9 @@ error:
} /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of direct blocks of
@@ -10353,11 +10340,11 @@ error:
* backfill & extend all skipped 2nd level indirect block's direct
* blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10376,10 +10363,11 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
"blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10465,7 +10453,7 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10484,20 +10472,20 @@ error:
} /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of 2nd level indirect
* blocks of 3rd level indirect block, then backfill & extend all
* skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10519,11 +10507,11 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
- "blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level "
+ "indirect block's direct blocks, and skip first row of indirect blocks of 3rd "
+ "level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10565,9 +10553,6 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10620,7 +10605,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10639,21 +10624,21 @@ error:
} /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first & second rows of 2nd level
* indirect blocks (although this 3rd level indirect block only
* has one row of 2nd level indirect blocks) of 3rd level indirect
- * block, then backfill & extend all skipped direct blocks.
+ * block, then backfill & extend all skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10675,11 +10660,11 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
- "blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level "
+ "indirect block's direct blocks, and skip first two rows of indirect blocks of "
+ "3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10691,9 +10676,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
/* Retrieve info about heap */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
- 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, fill_size, &state, &keep_ids))
@@ -10724,9 +10706,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10737,9 +10716,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows + 1) - obj_size;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10786,7 +10762,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10805,9 +10781,9 @@ error:
} /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row except the last one, fill direct
* blocks in last 3rd level indirect block, then insert object
@@ -10816,11 +10792,11 @@ error:
* use of the next row of 3rd level blocks), then backfill all
* skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -10841,12 +10817,12 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char
- *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd "
- "level indirect blocks, except last one, fill all direct blocks in last 3rd level "
- "indirect block, and insert object too large for it's 2nd level indirect blocks, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
+ "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect "
+ "blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object "
+ "too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10898,9 +10874,6 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10952,7 +10925,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -10971,9 +10944,9 @@ error:
} /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row, fill direct blocks in 2nd row 3rd
* level indirect block, fill all direct blocks in 1st row of
@@ -10983,11 +10956,11 @@ error:
* next row of 2nd level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -11004,16 +10977,16 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
unsigned
num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */
- h5_stat_size_t empty_size; /* Size of a file with an empty heap */
- size_t obj_size; /* Size of object */
- size_t fill_size; /* Size of objects for "bulk" filled blocks */
- fheap_heap_state_t state; /* State of fractal heap */
+ h5_stat_size_t empty_size; /* Size of a file with an empty heap */
+ size_t obj_size; /* Size of object */
+ size_t fill_size; /* Size of objects for "bulk" filled blocks */
+ fheap_heap_state_t state; /* State of fractal heap */
+ unsigned u; /* Local index variables */ /* Test description */
const char * base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect "
"blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level "
"indirect blocks, except last one, and insert object too large for 2nd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11072,9 +11045,6 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11125,7 +11095,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -11144,9 +11114,9 @@ error:
} /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks in 4th level indirect block, then
@@ -11154,11 +11124,11 @@ error:
* level indirect blocks of 4th level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -11179,11 +11149,12 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level "
- "indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11233,9 +11204,6 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11288,7 +11256,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -11307,9 +11275,9 @@ error:
} /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks and 2nd level indirect blocks in 4th
@@ -11319,11 +11287,11 @@ error:
* 3rd level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11344,12 +11312,13 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip "
"first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11415,9 +11384,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11470,7 +11436,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -11492,7 +11458,7 @@ error:
* Function:
*test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11504,11 +11470,11 @@ error:
* 3rd level indirect block (in 4th level indirect block), then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11529,13 +11495,14 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level "
"indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and "
"skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11634,9 +11601,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11689,7 +11653,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -11712,7 +11676,7 @@ error:
* Function:
*test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in 4th level indirect
@@ -11726,11 +11690,11 @@ error:
* 4th level block), then backfill all skipped direct blocks &
* extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11751,14 +11715,13 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, "
"fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect "
- "block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test
- description
- */
- unsigned u, v; /* Local index variables */
+ "block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11839,9 +11802,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11894,7 +11854,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -11916,7 +11876,7 @@ error:
* Function:
*test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11930,11 +11890,11 @@ error:
* next row of 4th level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11955,13 +11915,14 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect "
"blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd "
"level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12078,9 +12039,6 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- 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, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -12133,7 +12091,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12151,25 +12109,22 @@ error:
return (1);
} /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped()
*/
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_frag_simple
+ * Function: test_man_frag_simple
*
- * Purpose: Test inserting objects small enough to fit into first row of
+ * Purpose: Test inserting objects small enough to fit into first row of
* direct blocks, but not to share a block with another object,
* until start-block-size * 2 blocks are reached. Then, go back
* and fill in the space in the blocks skipped.
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -12186,10 +12141,9 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fragmenting small blocks, then backfill and extend, then remove all objects %s"; /* Test description
- */
- unsigned u; /* Local index variables */
+ unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12270,7 +12224,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12289,19 +12243,19 @@ error:
} /* test_man_frag_simple() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_direct
+ * Function: test_man_frag_direct
*
- * Purpose: Test inserting small object to fit into each direct block
+ * Purpose: Test inserting small object to fit into each direct block
* in root block, but not to share a block with another object,
* Then, go back and fill in the space in the blocks skipped.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12319,10 +12273,9 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description
- */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12440,7 +12393,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12459,9 +12412,9 @@ error:
} /* test_man_frag_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_2nd_direct
+ * Function: test_man_frag_2nd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* inserting small object to fit into each direct block
* in 2nd level indirect block, but not to share a block with
* another object.
@@ -12469,11 +12422,11 @@ error:
*
* Then, go back and remove all the objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12493,10 +12446,10 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct "
+ "blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12508,9 +12461,6 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
/* Compute # of bits used in first row */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
- 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, fill_size, &state, &keep_ids))
@@ -12554,7 +12504,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12573,9 +12523,9 @@ error:
} /* test_man_frag_2nd_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_3rd_direct
+ * Function: test_man_frag_3rd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block and
+ * Purpose: Test filling all direct blocks in root indirect block and
* all 2nd level indirect blocks, then
* inserting small object to fit into each direct block
* in 3rd level indirect block, but not to share a block with
@@ -12584,11 +12534,11 @@ error:
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12607,10 +12557,11 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's "
- "direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12673,7 +12624,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12690,21 +12641,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_frag_3rd_direct() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_one
+ * Function: test_huge_insert_one
*
- * Purpose: Test inserting one huge object in the heap
+ * Purpose: Test inserting one huge object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 7, 2006
*
*-------------------------------------------------------------------------
@@ -12726,7 +12674,8 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert one huge object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one huge object, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12773,7 +12722,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -12812,9 +12761,6 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -12827,7 +12773,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -12847,16 +12793,16 @@ error:
} /* test_huge_insert_one() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_two
+ * Function: test_huge_insert_two
*
- * Purpose: Test inserting two huge objects in the heap
+ * Purpose: Test inserting two huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -12879,7 +12825,8 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert two huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12928,7 +12875,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -12958,7 +12905,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13042,9 +12989,6 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13058,7 +13002,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -13079,16 +13023,16 @@ error:
} /* test_huge_insert_two() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_three
+ * Function: test_huge_insert_three
*
- * Purpose: Test inserting three huge objects in the heap
+ * Purpose: Test inserting three huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -13112,7 +13056,8 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert three huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert three huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13163,7 +13108,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -13193,7 +13138,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -13223,7 +13168,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13347,9 +13292,6 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13364,7 +13306,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -13386,16 +13328,16 @@ error:
} /* test_huge_insert_three() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_mix
+ * Function: test_huge_insert_mix
*
- * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
+ * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -13421,7 +13363,8 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert mix of normal & huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal & huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13476,7 +13419,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -13506,7 +13449,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -13536,7 +13479,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -13573,7 +13516,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -13611,7 +13554,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13770,9 +13713,6 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13789,7 +13729,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -13813,14 +13753,14 @@ error:
} /* test_huge_insert_mix() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_huge
+ * Function: test_filtered_huge
*
- * Purpose: Test storing 'huge' object in a heap with I/O filters
+ * Purpose: Test storing 'huge' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 15, 2006
*
*-------------------------------------------------------------------------
@@ -13847,8 +13787,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
size_t old_actual_id_len = 0; /* Old actual ID length */
hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */
hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */
- const char * base_desc =
- "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -13911,7 +13851,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
-/* QAK */
#ifdef QAK
/* Close the fractal heap */
if (H5HF_close(fh) < 0)
@@ -13938,7 +13877,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
#endif /* QAK */
- /* QAK */
/* Check up on heap... */
state.huge_size = obj_size;
@@ -13954,7 +13892,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13993,10 +13931,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14011,7 +13945,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
H5MM_xfree(heap_id);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -14028,21 +13962,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_filtered_huge() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_one
+ * Function: test_tiny_insert_one
*
- * Purpose: Test inserting one tiny object in the heap
+ * Purpose: Test inserting one tiny object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14064,7 +13995,8 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert one tiny object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one tiny object, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14111,7 +14043,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14150,9 +14082,6 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14165,7 +14094,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -14185,16 +14114,16 @@ error:
} /* test_tiny_insert_one() */
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_two
+ * Function: test_tiny_insert_two
*
- * Purpose: Test inserting two tiny objects in the heap
+ * Purpose: Test inserting two tiny objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14217,7 +14146,8 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert two tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two tiny objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14266,7 +14196,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object small enough to encode in heap ID */
@@ -14296,7 +14226,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14380,9 +14310,6 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14396,7 +14323,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -14417,17 +14344,17 @@ error:
} /* test_tiny_insert_two() */
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_mix
+ * Function: test_tiny_insert_mix
*
- * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
+ * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
* the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14455,8 +14382,8 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "insert mix of normal, huge & tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14515,14 +14442,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on first huge object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -14552,14 +14479,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on second huge object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -14589,14 +14516,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on third huge object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -14633,14 +14560,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on fourth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -14678,14 +14605,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on fifth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert sixth object small enough to encode in heap ID */
@@ -14715,14 +14642,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id6, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on sixth ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert seventh object small enough to encode in heap ID */
@@ -14752,14 +14679,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id7, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on seventh ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
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))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14980,9 +14907,6 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15001,7 +14925,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -15025,20 +14949,16 @@ error:
H5E_END_TRY;
return (1);
} /* test_tiny_insert_mix() */
-#endif /* QAK */
-#endif /* QAK2 */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_direct
+ * Function: test_filtered_man_root_direct
*
- * Purpose: Test storing one 'managed' object in a heap with I/O filters
+ * Purpose: Test storing one 'managed' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -15063,8 +14983,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char * base_desc =
- "insert one 'managed' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -15136,7 +15056,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15178,10 +15098,6 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15192,7 +15108,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -15208,14 +15124,14 @@ error:
} /* test_filtered_man_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_indirect
+ * Function: test_filtered_man_root_indirect
*
- * Purpose: Test storing several objects in a 'managed heap with I/O filters
+ * Purpose: Test storing several objects in a 'managed heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 24, 2006
*
*-------------------------------------------------------------------------
@@ -15241,8 +15157,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char * base_desc =
- "insert two 'managed' objects into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -15323,7 +15239,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id1, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Read in ('normal') object #2 */
@@ -15334,7 +15250,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15508,10 +15424,6 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15522,7 +15434,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -15536,23 +15448,20 @@ error:
H5E_END_TRY;
return (1);
} /* test_filtered_man_root_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_random
+ * Function: test_random
*
- * Purpose: Test inserting random sized objects into a heap, and read
+ * Purpose: Test inserting random sized objects into a heap, and read
* them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 9, 2006
*
*-------------------------------------------------------------------------
@@ -15624,10 +15533,10 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1156158635; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1156158635; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15648,10 +15557,6 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
- HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids,
- total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for (u = 0; u < keep_ids.num_ids; u++) {
@@ -15710,9 +15615,6 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15728,7 +15630,7 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -15751,19 +15653,19 @@ error:
} /* test_random() */
/*-------------------------------------------------------------------------
- * Function: test_random_pow2
+ * Function: test_random_pow2
*
- * Purpose: Test inserting random sized objects with a "power of 2
+ * Purpose: Test inserting random sized objects with a "power of 2
* distribution" (which favors small objects) into a heap,
* and read them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -15837,10 +15739,10 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1155181717; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1155181717; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15873,10 +15775,6 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
- HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids,
- total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for (u = 0; u < keep_ids.num_ids; u++) {
@@ -15935,10 +15833,6 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15954,7 +15848,7 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -15974,19 +15868,16 @@ error:
H5E_END_TRY;
return (1);
} /* test_random_pow2() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_write
+ * Function: test_write
*
- * Purpose: Test inserting objects, then changing the value for them.
+ * Purpose: Test inserting objects, then changing the value for them.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, December 18, 2006
*
*-------------------------------------------------------------------------
@@ -16171,7 +16062,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size))
+ if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Change size of data to write */
@@ -16220,7 +16111,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size))
+ if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Change size of data to write */
@@ -16250,7 +16141,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
H5MM_xfree(rewrite_obj);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -16268,21 +16159,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_write() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_bug1
+ * Function: test_bug1
*
- * Purpose: Test inserting several objects, then deleting one and
+ * Purpose: Test inserting several objects, then deleting one and
* re-inserting an object, along with opening and closing
* the file.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, November 28, 2006
*
*-------------------------------------------------------------------------
@@ -16426,7 +16314,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
H5MM_xfree(keep_ids.offs);
/* All tests passed */
- PASSED()
+ PASSED();
return (0);
@@ -16443,18 +16331,17 @@ error:
H5E_END_TRY;
return (1);
} /* test_bug1() */
-#endif /* QAK */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test the fractal heap code
+ * Purpose: Test the fractal heap code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -16483,7 +16370,7 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
/* Reset library */
h5_reset();
diff --git a/test/file_image.c b/test/file_image.c
index 8e04a01..f6075d5 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -706,7 +706,7 @@ error:
* 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl, hbool_t user)
{
@@ -970,7 +970,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
error:
return 1;
} /* end test_get_file_image() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/******************************************************************************
* Function: test_get_file_image_error_rejection
@@ -1384,14 +1384,14 @@ main(void)
} /* end for */
#if 0
- /* at present, H5Fget_file_image() rejects files opened with the
+ /* at present, H5Fget_file_image() rejects files opened with the
* family file driver, due to the addition of a driver info message
* in the super block. This message prevents the image being opened
- * with any driver other than the family file driver, which sort of
+ * with any driver other than the family file driver, which sort of
* defeats the purpose of the get file image operation.
*
* While this issues is quite fixable, we don't have time or resources
- * for this right now. Once we do, the following code should be
+ * for this right now. Once we do, the following code should be
* suitable for testing the fix.
*/
/* test H5Fget_file_image() with family file driver */
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
index 13ce9fd..b5def9b 100644
--- a/test/filenotclosed.c
+++ b/test/filenotclosed.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -77,10 +77,10 @@ main(void)
* Further investigation is needed to resolve the test failure with the
* split/multi driver. Please see HDFFV-10160.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (!contig_addr_vfd) {
SKIPPED();
- puts(" Temporary skipped for a spilt/multi driver");
+ HDputs(" Temporary skipped for a spilt/multi driver");
HDexit(EXIT_SUCCESS);
}
diff --git a/test/fillval.c b/test/fillval.c
index 870bf99..4215c89 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <robb@arborea.spizella.com>
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
* Purpose: Tests dataset fill values.
@@ -207,7 +207,7 @@ test_getset(void)
H5E_END_TRY;
if (fill_i != 0) {
H5_FAILED();
- puts(" H5Pget_fill_value() should return default 0");
+ HDputs(" H5Pget_fill_value() should return default 0");
goto error;
}
@@ -226,8 +226,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) {
H5_FAILED();
- puts(" Failed to get fill value using same data type that was ");
- puts(" used to set the fill value.");
+ HDputs(" Failed to get fill value using same data type that was ");
+ HDputs(" used to set the fill value.");
goto error;
}
@@ -238,8 +238,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) {
H5_FAILED();
- puts(" Failed to get fill value using a data type other than what");
- puts(" was used to set the fill value.");
+ HDputs(" Failed to get fill value using a data type other than what");
+ HDputs(" was used to set the fill value.");
goto error;
}
@@ -252,7 +252,7 @@ test_getset(void)
goto error;
if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) {
H5_FAILED();
- puts(" Resetting the fill value was unsuccessful.");
+ HDputs(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -324,7 +324,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value))
+ if (HDstrcmp(f2, orig_fill_value) != 0)
TEST_ERROR
/* Release the fill value retrieved */
@@ -366,7 +366,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value))
+ if (HDstrcmp(f2, orig_fill_value) != 0)
TEST_ERROR
/* Release the fill value retrieved */
@@ -670,12 +670,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
@@ -690,7 +690,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
- puts(" Got allocated space instead of unallocated.");
+ HDputs(" Got allocated space instead of unallocated.");
HDprintf(" Got %d\n", allocation);
goto error;
}
@@ -702,12 +702,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
@@ -725,7 +725,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- puts(" Got wrong fill value");
+ HDputs(" Got wrong fill value");
HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y,
rd_c.x, rd_c.z);
}
@@ -754,14 +754,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
@@ -794,14 +794,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
@@ -819,7 +819,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- puts(" Got wrong fill value");
+ HDputs(" Got wrong fill value");
HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -935,7 +935,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, "
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], val_rd,
fillval);
@@ -952,7 +953,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %f, %d, %f, %c"
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
(double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)fill_c.a, fill_c.x, fill_c.y,
@@ -994,7 +996,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %u, "
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], buf[u],
fillval);
@@ -1020,7 +1023,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %f, %d, %f, %c"
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
(double)buf_c[u].a, buf_c[u].x, buf_c[u].y, buf_c[u].z, (double)fill_c.a,
@@ -1445,7 +1449,8 @@ test_extend_verify_integer(unsigned lineno, const hsize_t *offset, const void *_
if (*test_val != *compare_val) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
HDfprintf(stdout,
- " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: %d, "
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: %d, "
"expected: %d\n",
offset[0], offset[1], offset[2], offset[3], offset[4], *test_val, *compare_val);
goto error;
@@ -1532,11 +1537,12 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
(const comp_vl_datatype *)_compare_val; /* Value to compare against */
/* Verify value */
- if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) ||
- HDstrcmp(test_val->b, compare_val->b) || (test_val->y != compare_val->y)) {
+ if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 ||
+ HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
HDfprintf(stdout,
- " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: {%d, '%s', '%s', %d} "
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: {%d, '%s', '%s', %d} "
"expected: {%d, '%s', '%s', %d}\n",
offset[0], offset[1], offset[2], offset[3], offset[4], test_val->x, test_val->a,
test_val->b, test_val->y, compare_val->x, compare_val->a, compare_val->b, compare_val->y);
@@ -1588,7 +1594,7 @@ test_extend_release_cmpd_vl(void *_elmt)
*-------------------------------------------------------------------------
*/
static int
-test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_size, hsize_t *start_size,
+test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size,
hsize_t *max_size, hid_t dtype, void *fillval)
{
hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */
@@ -1606,12 +1612,16 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
void * val_rd, *odd_val;
const void * init_val, *should_be, *even_val;
int val_rd_i, init_val_i = 9999;
- comp_vl_datatype init_val_c = {87, "baz", "mumble", 129};
+ comp_vl_datatype init_val_c = {87, NULL, NULL, 129};
comp_vl_datatype val_rd_c;
void * buf = NULL;
unsigned odd; /* Whether an odd or even coord. was read */
unsigned i, j; /* Local index variables */
+ /* Set vl datatype init value strings */
+ init_val_c.a = HDstrdup("baz");
+ init_val_c.b = HDstrdup("mumble");
+
/* Make copy of dataset creation property list */
if ((dcpl = H5Pcopy(_dcpl)) < 0)
TEST_ERROR
@@ -1647,7 +1657,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
} /* end if */
else {
/* Sanity check */
- assert(dtype_class == H5T_COMPOUND);
+ HDassert(dtype_class == H5T_COMPOUND);
/* Initialize specific values for this datatype */
val_size = sizeof(comp_vl_datatype);
@@ -1699,7 +1709,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
} /* end for */
/* Check for overflow */
- assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
+ HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
/* Allocate & initialize buffer */
buf = HDmalloc((size_t)(nelmts * val_size));
@@ -2007,8 +2017,10 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
/* Release elements & memory buffer */
for (i = 0; i < nelmts; i++)
release_rtn((void *)((char *)buf + (val_size * i)));
+
+ HDfree(init_val_c.a);
+ HDfree(init_val_c.b);
HDfree(buf);
- buf = NULL;
/* Cleanup IDs */
if (H5Pclose(dcpl) < 0)
@@ -2021,8 +2033,10 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
return 0;
error:
- if (buf)
- HDfree(buf);
+ HDfree(init_val_c.a);
+ HDfree(init_val_c.b);
+ HDfree(buf);
+
H5E_BEGIN_TRY
{
H5Pclose(dcpl);
@@ -2065,7 +2079,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
#else
int fillval_i = 0x4c70f1cd;
#endif
- comp_vl_datatype fillval_c = {32, "foo", "bar", 64}; /* Fill value for compound+vl datatype tests */
+ comp_vl_datatype fillval_c = {32, NULL, NULL, 64}; /* Fill value for compound+vl datatype tests */
char filename[1024];
/* Print testing message */
@@ -2074,6 +2088,10 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
else
TESTING("contiguous dataset extend")
+ /* Set vl datatype fill value strings */
+ fillval_c.a = HDstrdup("foo");
+ fillval_c.b = HDstrdup("bar");
+
/* Create dataset creation property list */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR
@@ -2131,7 +2149,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*/
if (H5D_CONTIGUOUS == layout) {
SKIPPED();
- puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
+ HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
goto skip;
}
#endif
@@ -2161,11 +2179,17 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Fclose(file) < 0)
TEST_ERROR
+ HDfree(fillval_c.a);
+ HDfree(fillval_c.b);
+
PASSED();
return 0;
error:
+ HDfree(fillval_c.a);
+ HDfree(fillval_c.b);
+
H5E_BEGIN_TRY
{
H5Tclose(cmpd_vl_tid);
@@ -2176,6 +2200,9 @@ error:
return 1;
skip:
+ HDfree(fillval_c.a);
+ HDfree(fillval_c.b);
+
H5E_BEGIN_TRY
{
H5Pclose(dcpl);
@@ -2240,7 +2267,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- puts(" Got a different dimension size than what was set.");
+ HDputs(" Got a different dimension size than what was set.");
HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2252,7 +2279,7 @@ test_compatible(void)
goto error;
if (val_rd != 0) {
H5_FAILED();
- puts(" Got a different value than what was set.");
+ HDputs(" Got a different value than what was set.");
HDprintf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
@@ -2293,7 +2320,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- puts(" Got a different dimension size than what was set.");
+ HDputs(" Got a different dimension size than what was set.");
HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2305,7 +2332,7 @@ test_compatible(void)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
- puts(" Got a different value than what was set.");
+ HDputs(" Got a different value than what was set.");
HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
@@ -2640,11 +2667,11 @@ main(int argc, char *argv[])
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
for (argno = 1; argno < argc; argno++) {
- if (!strcmp(argv[argno], "contiguous"))
+ if (!HDstrcmp(argv[argno], "contiguous"))
test_contig = 1;
- else if (!strcmp(argv[argno], "chunked"))
+ else if (!HDstrcmp(argv[argno], "chunked"))
test_chunk = 1;
- else if (!strcmp(argv[argno], "compact"))
+ else if (!HDstrcmp(argv[argno], "compact"))
test_compact = 1;
else {
HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
@@ -2674,11 +2701,11 @@ main(int argc, char *argv[])
/* Set the FAPL for the type of format */
if (new_format) {
- puts("\nTesting with new file format:");
+ HDputs("\nTesting with new file format:");
my_fapl = fapl2;
} /* end if */
else {
- puts("Testing with old file format:");
+ HDputs("Testing with old file format:");
my_fapl = fapl;
} /* end else */
diff --git a/test/filter_fail.c b/test/filter_fail.c
index e933a48..a1bcf28 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * Programmer: Raymond Lu
* 7 September 2010
*
* Purpose: Make sure dataset, file, and library can close properly when a
@@ -174,7 +174,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- puts(" Data writing is supposed to fail because the chunk can't be written to file.");
+ HDputs(" Data writing is supposed to fail because the chunk can't be written to file.");
TEST_ERROR
}
}
@@ -195,7 +195,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
+ HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file.");
TEST_ERROR
}
}
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 61518f7..276141a 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1068,7 +1068,7 @@ test_path_api_calls(void)
/* Get the path */
if ((path_len = H5PLget(0, path, 256)) <= 0) {
- HDfprintf(stderr, " get 0 len: %u : %s\n", path_len, path);
+ HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
if (HDstrcmp(path, "a_path_0") != 0) {
diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c
index 9810678..5d6c1ef 100644
--- a/test/filter_plugin1_dsets.c
+++ b/test/filter_plugin1_dsets.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,14 +26,14 @@ static size_t add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER1_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)add_sub_value, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER1_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ add_sub_value, /* The actual filter function */
}};
H5PL_type_t
diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c
index 425bf81..d2011d4 100644
--- a/test/filter_plugin2_dsets.c
+++ b/test/filter_plugin2_dsets.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,14 +27,14 @@ static size_t mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigne
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER2_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 2", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)mult_div_value, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER2_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ mult_div_value, /* The actual filter function */
}};
H5PL_type_t
@@ -73,7 +73,7 @@ mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
return 0;
/* Assignment to eliminate unused parameter warning */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) {
/* READ - Divide the original value by MULTIPLIER */
diff --git a/test/filter_plugin3_dsets.c b/test/filter_plugin3_dsets.c
index 55f13ef..618ce06 100644
--- a/test/filter_plugin3_dsets.c
+++ b/test/filter_plugin3_dsets.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,14 +30,14 @@ static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const uns
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER3_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 3", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER3_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 3", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ add_sub_value_hdf5, /* The actual filter function */
}};
H5PL_type_t
diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c
index a342d54..630dcd6 100644
--- a/test/filter_plugin4_groups.c
+++ b/test/filter_plugin4_groups.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,14 +29,14 @@ static size_t append_to_group_name(unsigned int flags, size_t cd_nelmts, const u
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER4_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 4", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)append_to_group_name, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER4_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 4", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ append_to_group_name, /* The actual filter function */
}};
H5PL_type_t
@@ -74,7 +74,7 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, const unsigned int *c
return 0;
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) {
/* READ - Remove the suffix from the group name */
diff --git a/test/flush1.c b/test/flush1.c
index f9c64a5..456f5f4 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 23, 1998
*
* Purpose: This is the first half of a two-part test that makes sure
diff --git a/test/flush2.c b/test/flush2.c
index 451dc25..3262b14 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 23, 1998
*
* Purpose: This is the second half of a two-part test that makes sure
@@ -260,7 +260,7 @@ main(void)
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
check_second_dset = FALSE;
if (file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
@@ -273,7 +273,7 @@ main(void)
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR
if (file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
} /* end if */
@@ -299,7 +299,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if (H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
@@ -326,7 +326,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if (H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
@@ -342,7 +342,7 @@ main(void)
check_second_dset = TRUE;
h5_fixname(FILENAME[4], fapl_id, filename, sizeof(filename));
if (file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
@@ -357,7 +357,7 @@ main(void)
if (clear_status_flags(filename, fapl_id) < 0)
TEST_ERROR
if (file_ok(filename, fapl_id, check_second_dset))
- PASSED()
+ PASSED();
else
TEST_ERROR
} /* end if */
@@ -385,7 +385,7 @@ main(void)
#endif
} /* end if */
else
- PASSED()
+ PASSED();
/* Turn the error stack back on */
if (H5Eset_auto2(H5E_DEFAULT, func, NULL) < 0)
FAIL_STACK_ERROR
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 798d45a..5efff2f 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake
index 6faf37b..9a99902 100644
--- a/test/flushrefreshTest.cmake
+++ b/test/flushrefreshTest.cmake
@@ -5,7 +5,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -41,7 +41,7 @@ endif ()
message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
if (TEST_LIBRARY_DIRECTORY)
- if (WIN32 OR MINGW)
+ if (WIN32)
set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
else ()
set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
diff --git a/test/freespace.c b/test/freespace.c
index 515d38e..9a53dce 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -400,22 +400,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
FAIL_STACK_ERROR
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space,
- state->tot_space);
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
@@ -536,7 +541,7 @@ test_fs_create(hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -664,7 +669,7 @@ test_fs_sect_add(hid_t fapl)
if (tmp_file_size <= (file_size + fr_meta_size))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space with H5FS_CLS_GHOST_OBJ: test 2");
@@ -726,7 +731,7 @@ test_fs_sect_add(hid_t fapl)
if (tmp_file_size != (file_size + fr_meta_size))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space: test 3");
@@ -795,7 +800,7 @@ test_fs_sect_add(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("adding a section via H5FS_sect_add() to free-space: test 4");
@@ -870,11 +875,11 @@ test_fs_sect_add(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -973,7 +978,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find() a section equal to requested-size from free-space");
@@ -1100,7 +1105,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find() a section greater than requested-size from free-space");
@@ -1179,7 +1184,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
frsp = NULL;
- PASSED()
+ PASSED();
TESTING("H5FS_sect_find(): cannot find a section with requested-size from free-space");
@@ -1238,11 +1243,11 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -1444,7 +1449,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -1547,7 +1552,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 3
@@ -1720,7 +1725,7 @@ test_fs_sect_merge(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -1895,7 +1900,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 2");
@@ -1996,7 +2001,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("shrinking of sections when H5FS_sect_add() to free-space: test 3");
@@ -2088,7 +2093,7 @@ test_fs_sect_shrink(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -2241,7 +2246,7 @@ test_fs_sect_change_class(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -2359,7 +2364,7 @@ test_fs_sect_change_class(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
@@ -2514,7 +2519,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* TEST 2
@@ -2588,7 +2593,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* Test 3
@@ -2663,7 +2668,7 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
/*
* TEST 4
@@ -2737,9 +2742,9 @@ test_fs_sect_extend(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- PASSED()
+ PASSED();
- /* Close the file and dxpl */
+ /* Close the file */
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2841,11 +2846,11 @@ test_fs_sect_iterate(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return 0;
diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c
index 8002368..d5fcec1 100644
--- a/test/gen_bad_compound.c
+++ b/test/gen_bad_compound.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* April 14, 2011
*
* Purpose: This program is run to generate an HDF5 data file with objects
diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c
index e9b37b8..b4ca70d 100644
--- a/test/gen_bad_offset.c
+++ b/test/gen_bad_offset.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index 0199ad9..b24371e 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Jan 5, 2008
*
* Purpose: This program is run to generate an HDF5 data file with a
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index a789791..a37c6bc 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Apr 17, 2007
*
* Purpose: This program is run to generate an HDF5 data file with several
diff --git a/test/gen_bounds.c b/test/gen_bounds.c
index 6933626..8148f16 100644
--- a/test/gen_bounds.c
+++ b/test/gen_bounds.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -27,8 +27,60 @@
* that they can or cannot read particular file format.
*/
+/*
+ * Add two routines gen_ref_files() and gen_sel_files() to generate the
+ * following test files:
+ *
+ * (1) gen_ref_files():
+ * bounds_ref_earliest_latest.h5
+ * bounds_ref_latest_latest.h5
+ * bounds_ref_v110_v110.h5
+ * bounds_ref_v18_v18.h5
+ * (1) gen_sel_files():
+ * bounds_sel_earliest_latest.h5
+ * bounds_sel_latest_latest.h5
+ * bounds_sel_v112_v112.h5
+ * bounds_sel_v110_v110.h5
+ *
+ * These test files will be copied to 1.12, 1.10 and 1.8 libraries for
+ * compatibility testing.
+ */
#include "h5test.h"
+/*
+ * Defines for gen_ref_files()
+ */
+/* File names used for references */
+#define FILENAME_REF_E_L "bounds_ref_earliest_latest.h5"
+#define FILENAME_REF_L_L "bounds_ref_latest_latest.h5"
+#define FILENAME_REF_V112_V112 "bounds_ref_v112_v112.h5"
+#define FILENAME_REF_V110_V110 "bounds_ref_v110_v110.h5"
+#define FILENAME_REF_V18_V18 "bounds_ref_v18_v18.h5"
+
+/* Dataset names for references */
+#define REVISED_REFS_DSET "Revised_refs_dset"
+#define OLD_REF_OBJ_DSET "Old_ref_object_dset"
+#define OLD_REF_REG_DSET "Old_ref_region_dset"
+
+#define GROUP "Group"
+#define ATTR "Attr"
+#define DATASET "Dataset"
+#define POWER32 4294967296 /* 2^32 */
+
+/*
+ * Defines for gen_sel_files()
+ */
+/* File names for hyperslab/point selections */
+#define FILENAME_SEL_E_L "bounds_sel_earliest_latest.h5"
+#define FILENAME_SEL_L_L "bounds_sel_latest_latest.h5"
+#define FILENAME_SEL_V112_V112 "bounds_sel_v112_v112.h5"
+#define FILENAME_SEL_V110_V110 "bounds_sel_v110_v110.h5"
+
+/* Dataset names for hyperslab/point selections */
+#define SEL_EX_REG_DSET "Sel_ex32_reg_dset"
+#define SEL_EX_IRR_DSET "Sel_ex32_irr_dset"
+#define SEL_EX_PT_DSET "Sel_ex32_pt_dset"
+
/***********************************************************************
* gen_earliest_latest() creates file "bounds_earliest_latest.h5"
*
@@ -692,6 +744,472 @@ error:
return FAIL;
} /* gen_v18_v18 */
+/***********************************************************************
+ * gen_sel_files() is used to create the following test files:
+ * bounds_sel_earliest_latest.h5
+ * bounds_sel_latest_latest.h5
+ * bounds_sel_v112_v112.h5
+ * bounds_sel_v110_v110.h5
+ *
+ * File contents for:
+ * --bounds_sel_earliest_latest.h5
+ * --bounds_sel_latest_latest.h5
+ * --bounds_sel_v112_v112.h5
+ * --each file contains 3 datasets with old region reference type
+ * (1) Sel_ex32_reg_dset:
+ * --regular hyperslab selection exceeding 32 bits integer limit
+ * (2) Sel_ex32_irr_dset:
+ * --irregular hyperslab selection exceeding 32 bits integer limit
+ * (3) Sel_ex32_pt_dset:
+ * --point selection exceeding 32 bits integer limit
+ *
+ * File contents for:
+ * --bounds_ref_v110_v110.h5
+ * (1) Sel_ex32_reg_dset: a dataset with old region reference type
+ * --regular hyperslab selection exceeding 32 bits integer limit
+ * (2) Sel_ex32_irr_dset: does not exist, cannot be created
+ * (3) Sel_ex32_pt_dset: does not exist, cannot be created
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t
+gen_sel_files(const char *filename, H5F_libver_t low_bound, H5F_libver_t high_bound)
+{
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t numparticles = 8388608;
+ hsize_t total_particles = numparticles * 513;
+ hsize_t vdsdims[1] = {total_particles}; /* Dataset dimension size */
+ hsize_t coord[4]; /* Point selection */
+ hsize_t ref_start; /* Starting location of hyperslab */
+ hsize_t ref_stride; /* Stride of hyperslab */
+ hsize_t ref_count; /* Element count of hyperslab */
+ hsize_t ref_block; /* Block size of hyperslab */
+ hid_t ref_sid = H5I_INVALID_HID; /* Dataspace ID for the reference dataset */
+ hid_t ref_did = H5I_INVALID_HID; /* Dataset ID for the reference dataset */
+ hsize_t ref_dims[1] = {1}; /* Dimension for reference dataset */
+ hdset_reg_ref_t ref_wbuf[1]; /* Buffer for dataset region reference */
+
+ /*
+ * Create test file, attribute, group and dataset
+ */
+
+ /* Create the test file */
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create a dataset */
+ if ((sid = H5Screate_simple(1, vdsdims, NULL)) < 0)
+ TEST_ERROR;
+
+ if ((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ /* Create file access property list */
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ TEST_ERROR;
+
+ /* Set to use the low/high bounds in fapl */
+ if (H5Pset_libver_bounds(fapl, low_bound, high_bound) < 0)
+ TEST_ERROR;
+
+ /* Open the file with fapl */
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR;
+
+ /* Open the dataset */
+ if ((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Get the dataset's dataspace */
+ if ((sid = H5Dget_space(did)) < 0)
+ TEST_ERROR;
+
+ /* Create dataspace for the reference dataset */
+ ref_dims[0] = 1;
+ if ((ref_sid = H5Screate_simple(1, ref_dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Generate regular hyperslab exceeding 32 */
+ ref_start = 0;
+ ref_count = 2;
+ ref_block = 4;
+ ref_stride = POWER32;
+
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, &ref_start, &ref_stride, &ref_count, &ref_block) < 0)
+ TEST_ERROR;
+
+ /* Should succeed for v110 and above */
+ if (high_bound >= H5F_LIBVER_V110) {
+
+ /* Create the first reference */
+ if (H5Rcreate(&ref_wbuf[0], fid, DATASET, H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR;
+
+ /* Create the reference datset */
+ if ((ref_did = H5Dcreate2(fid, SEL_EX_REG_DSET, H5T_STD_REF_DSETREG, ref_sid, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Write to the reference datset */
+ if (H5Dwrite(ref_did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_wbuf) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+ }
+
+ /* Generate irregular hyperslab exceeding 32 */
+ ref_start = 8;
+ ref_count = 5;
+ ref_block = 2;
+ ref_stride = POWER32;
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_OR, &ref_start, &ref_stride, &ref_count, &ref_block) < 0)
+ TEST_ERROR;
+
+ /* Should succeed for v112 and above */
+ if (high_bound >= H5F_LIBVER_V112) {
+
+ /* Create the second reference */
+ if (H5Rcreate(&ref_wbuf[0], fid, DATASET, H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR;
+
+ /* Create the reference datset */
+ if ((ref_did = H5Dcreate2(fid, SEL_EX_IRR_DSET, H5T_STD_REF_DSETREG, ref_sid, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Write to the reference datset */
+ if (H5Dwrite(ref_did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_wbuf) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+ }
+
+ /* Generate point selection exceeding 32 */
+ coord[0] = 5;
+ coord[1] = 15;
+ coord[2] = POWER32 + 1;
+ coord[3] = 19;
+
+ if (H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord) < 0)
+ TEST_ERROR;
+
+ /* Should succeed for v112 and above */
+ if (high_bound >= H5F_LIBVER_V112) {
+
+ /* Create the third reference */
+ if (H5Rcreate(&ref_wbuf[0], fid, DATASET, H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR;
+
+ /* Create the reference datset */
+ if ((ref_did = H5Dcreate2(fid, SEL_EX_PT_DSET, H5T_STD_REF_DSETREG, ref_sid, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Write to the reference datset */
+ if (H5Dwrite(ref_did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_wbuf) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+ }
+
+ /* Closing */
+ if (H5Sclose(ref_sid) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(ref_did);
+ H5Sclose(ref_sid);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ }
+ H5E_END_TRY;
+
+ return FAIL;
+
+} /* gen_sel_files() */
+
+/***********************************************************************
+ * gen_ref_files() is used to create the following test files:
+ * bounds_ref_earliest_latest.h5
+ * bounds_ref_latest_latest.h5
+ * bounds_ref_v110_v110.h5
+ * bounds_ref_v18_v18.h5
+ *
+ * File contents for:
+ * --bounds_ref_earliest_latest.h5
+ * --bounds_ref_latest_latest.h5
+ * --bounds_ref_v112_v112.h5
+ * (1) Revised_refs_dset: a dataset created with the revised reference type
+ * --attribute reference
+ * --object reference
+ * --dataset region reference
+ * (2) Old_ref_object_dset:
+ * --a dataset created with the old object reference type
+ * (3) Old_ref_region_dset:
+ * --a dataset created with the old dataset region reference type
+ *
+ * File contents for:
+ * --bounds_ref_v110_v110.h5
+ * --bounds_ref_v18_v18.h5
+ * (1) Old_ref_object_dset:
+ * --a dataset created with the old object reference type
+ * (2) Old_ref_region_dset:
+ * --a dataset created with the old dataset region reference type
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t
+gen_ref_files(const char *filename, H5F_libver_t low_bound, H5F_libver_t high_bound)
+{
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t asid = H5I_INVALID_HID; /* Dataspace ID for attribute */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hsize_t dims[1] = {100}; /* Dimension size */
+ unsigned * dwbuf = NULL; /* Buffer for writing data */
+ hid_t ref_sid = H5I_INVALID_HID; /* Dataspace ID for the reference dataset */
+ hid_t ref_did = H5I_INVALID_HID; /* Dataset ID for the reference dataset */
+ hsize_t rev_ref_dims[1] = {3}; /* Dimension size for the reference dataset */
+ H5R_ref_t rev_ref_wbuf[3]; /* Buffer for storing the revised references */
+ hobj_ref_t old_ref_obj_wbuf[1]; /* Buffer for storing the old reference object */
+ hdset_reg_ref_t old_ref_reg_wbuf[1]; /* Buffer for storing the old dataset region reference */
+ hsize_t old_ref_dims[] = {1}; /* Dimension size for the reference dataset */
+ hsize_t start[1]; /* Starting location of hyperslab */
+ hsize_t stride[1]; /* Stride of hyperslab */
+ hsize_t count[1]; /* Element count of hyperslab */
+ hsize_t block[1]; /* Block size of hyperslab */
+ unsigned i; /* Local index variable */
+
+ /*
+ * Create test file, attribute, group and dataset
+ */
+
+ if ((dwbuf = HDcalloc(sizeof(unsigned), 100)) == NULL)
+ TEST_ERROR;
+
+ /* Create the test file */
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create dataspace for the attribute */
+ if ((asid = H5Screate(H5S_SCALAR)) < 0)
+ TEST_ERROR;
+
+ /* Create an attribute to the root group */
+ if ((aid = H5Acreate2(fid, ATTR, H5T_NATIVE_UINT, asid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create a group */
+ if ((gid = H5Gcreate2(fid, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create dataspace for the dataset */
+ if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Create a dataset in the group */
+ if ((did = H5Dcreate2(gid, DATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Initialize data to write */
+ for (i = 0; i < 100; i++)
+ dwbuf[i] = i * 3;
+
+ /* Write data to disk */
+ if (H5Dwrite(did, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dwbuf) < 0)
+ TEST_ERROR;
+
+ /* Closing */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+ if (H5Sclose(asid) < 0)
+ TEST_ERROR;
+ if (H5Aclose(aid) < 0)
+ TEST_ERROR;
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ if (dwbuf) {
+ HDfree(dwbuf);
+ dwbuf = NULL;
+ }
+
+ /* Create file access property list */
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ TEST_ERROR;
+
+ /* Set to use the low/high bounds in fapl */
+ if (H5Pset_libver_bounds(fapl, low_bound, high_bound) < 0)
+ TEST_ERROR;
+
+ /* Open the file with fapl */
+ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR;
+
+ /*
+ * Create the revised and old references in the file
+ */
+
+ /* Retrieve dataspace for the existing dataset */
+ if ((did = H5Dopen2(fid, "/Group/Dataset", H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if ((sid = H5Dget_space(did)) < 0)
+ TEST_ERROR;
+
+ /* Select 15 2x1 hyperslabs for the dataset region reference */
+ start[0] = 2;
+ stride[0] = 5;
+ count[0] = 15;
+ block[0] = 2;
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block) < 0)
+ TEST_ERROR;
+
+ if (high_bound >= H5F_LIBVER_V112) {
+
+ /* Create dataspace for the reference dataset */
+ if ((ref_sid = H5Screate_simple(1, rev_ref_dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Create a dataset with the revised reference type */
+ ref_did =
+ H5Dcreate2(fid, REVISED_REFS_DSET, H5T_STD_REF, ref_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Store the reference to "Attr" */
+ if (H5Rcreate_attr(fid, "/", "Attr", H5P_DEFAULT, &rev_ref_wbuf[0]) < 0)
+ TEST_ERROR;
+
+ /* Store the reference to /Group */
+ if (H5Rcreate_object(fid, "/Group", H5P_DEFAULT, &rev_ref_wbuf[1]) < 0)
+ TEST_ERROR;
+
+ /* Store the dataset region referenced to /Group/Dataset */
+ if (H5Rcreate_region(fid, "/Group/Dataset", sid, H5P_DEFAULT, &rev_ref_wbuf[2]) < 0)
+ TEST_ERROR;
+
+ /* Write to the reference dataset */
+ if (H5Dwrite(ref_did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rev_ref_wbuf) < 0)
+ TEST_ERROR;
+
+ /* Destroy references */
+ for (i = 0; i < 3; i++)
+ if (H5Rdestroy(&rev_ref_wbuf[i]) < 0)
+ TEST_ERROR;
+
+ /* Closing */
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+
+ if (H5Sclose(ref_sid) < 0)
+ TEST_ERROR;
+ }
+
+ /* Create dataspace for the reference dataset */
+ if ((ref_sid = H5Screate_simple(1, old_ref_dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Create a dataset with the old object reference type */
+ if ((ref_did = H5Dcreate2(fid, OLD_REF_OBJ_DSET, H5T_STD_REF_OBJ, ref_sid, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create reference to /Group */
+ if (H5Rcreate(&old_ref_obj_wbuf[0], fid, "/Group", H5R_OBJECT, -1) < 0)
+ TEST_ERROR;
+
+ /* Write to the reference dataset */
+ if (H5Dwrite(ref_did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, old_ref_obj_wbuf) < 0)
+ TEST_ERROR;
+
+ /* Close the dataset */
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+
+ /* Create a dataset with the old dataset region reference type */
+ if ((ref_did = H5Dcreate2(fid, OLD_REF_REG_DSET, H5T_STD_REF_DSETREG, ref_sid, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create dataset region reference */
+ if (H5Rcreate(&old_ref_reg_wbuf[0], fid, "/Group/Dataset", H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR;
+
+ /* Write selection to the reference dataset */
+ if (H5Dwrite(ref_did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, old_ref_reg_wbuf) < 0)
+ TEST_ERROR;
+
+ /* Closing */
+ if (H5Dclose(ref_did) < 0)
+ TEST_ERROR;
+ if (H5Sclose(ref_sid) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+ if (H5Pclose(fapl) < 0)
+ TEST_ERROR;
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(ref_did);
+ H5Sclose(ref_sid);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ HDfree(dwbuf);
+ }
+ H5E_END_TRY;
+
+ return FAIL;
+
+} /* gen_ref_files() */
+
int
main(void)
{
@@ -715,6 +1233,50 @@ main(void)
if (gen_v18_v18() < 0)
TEST_ERROR;
+ /*
+ * Files generated via gen_ref_files()
+ */
+
+ /* Generate bounds_ref_earliest_latest.h5 */
+ if (gen_ref_files(FILENAME_REF_E_L, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_ref_latest_latest.h5 */
+ if (gen_ref_files(FILENAME_REF_L_L, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_ref_v112_v112.h5 */
+ if (gen_ref_files(FILENAME_REF_V112_V112, H5F_LIBVER_V112, H5F_LIBVER_V112) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_ref_v110_v110.h5 */
+ if (gen_ref_files(FILENAME_REF_V110_V110, H5F_LIBVER_V110, H5F_LIBVER_V110) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_ref_v18_v18.h5 */
+ if (gen_ref_files(FILENAME_REF_V18_V18, H5F_LIBVER_V18, H5F_LIBVER_V18) < 0)
+ TEST_ERROR;
+
+ /*
+ * Files generated via gen_sel_files()
+ */
+
+ /* Generate bounds_sel_earliest_latest.h5 */
+ if (gen_sel_files(FILENAME_SEL_E_L, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_sel_latest_latest.h5 */
+ if (gen_sel_files(FILENAME_SEL_L_L, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_sel_v112_v112.h5 */
+ if (gen_sel_files(FILENAME_SEL_V112_V112, H5F_LIBVER_V112, H5F_LIBVER_V112) < 0)
+ TEST_ERROR;
+
+ /* Generate bounds_sel_v110_v110.h5 */
+ if (gen_sel_files(FILENAME_SEL_V110_V110, H5F_LIBVER_V110, H5F_LIBVER_V110) < 0)
+ TEST_ERROR;
+
return EXIT_SUCCESS;
error:
diff --git a/test/gen_cross.c b/test/gen_cross.c
index c5d9cd6..2746bb6 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Thursday, March 23, 2006
*
* This program writes floating-point data to the HDF5 file. It generates
@@ -295,7 +295,7 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
hid_t dataset = -1; /* dataset handles */
hid_t dcpl = -1;
double data[NX][NY]; /* data to write */
- double fillvalue = -2.2f;
+ double fillvalue = -2.2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
int i, j;
@@ -928,7 +928,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
#else /* H5_HAVE_FILTER_DEFLATE */
const char *not_supported = "Deflate filter is not enabled. Can't create the dataset.";
- puts(not_supported);
+ HDputs(not_supported);
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 22c901c..d11ed09 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/gen_file_image.c b/test/gen_file_image.c
index 44bf0d2..b5e07da 100644
--- a/test/gen_file_image.c
+++ b/test/gen_file_image.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/gen_filespace.c b/test/gen_filespace.c
index 3803628..d938839 100644
--- a/test/gen_filespace.c
+++ b/test/gen_filespace.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/gen_filters.c b/test/gen_filters.c
index a97c2f6..7b7c268 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -37,7 +37,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned
*
* Failure: -1
*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* Thursday, March 25, 2004
*
*-------------------------------------------------------------------------
@@ -243,12 +243,12 @@ main(void)
if (nerrors)
goto error;
- printf("All tests passed.\n");
+ HDprintf("All tests passed.\n");
return 0;
error:
nerrors = MAX(1, nerrors);
- printf("***** %d GEN_FILTERS FAILURES *****\n", nerrors);
+ HDprintf("***** %d GEN_FILTERS FAILURES *****\n", nerrors);
return 1;
}
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index 84f4376..d805dbf 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, June 30, 2006
*
* This program creates an object with fragmented object header messages
diff --git a/test/gen_new_array.c b/test/gen_new_array.c
index 6cd2d7d..5811106 100644
--- a/test/gen_new_array.c
+++ b/test/gen_new_array.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets, one with a compound datatypes with array
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index d0f043b..2c18f59 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Feb 27, 2002
*
* Purpose: This program is run to generate a HDF5 data file with fill
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index a73828b..3557192 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with both
diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c
index 87de948..bb977ad 100644
--- a/test/gen_new_mtime.c
+++ b/test/gen_new_mtime.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the newer mtime information
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index 107cab2..ce2f88a 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
* Purpose: Create a file which will have the newer superblock format.
@@ -23,40 +23,36 @@
* put into the 'test' directory in the 1.4+ branch of the library.
*/
-#include <assert.h>
-#include "hdf5.h"
+#include "h5test.h"
#define TESTFILE "tsupern.h5"
#define ISTORE_IK 64
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Create a file with a new version (>0) of the superblock
+ * Purpose: Create a file with a new version (>0) of the superblock
*
- * Return: Success:
- * Failure:
+ * Return: EXIT_SUCCESS
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t file; /* File IDs for old & new files */
- hid_t fcpl; /* File creation property list */
- herr_t ret; /* Generic return value */
+ hid_t file; /* File IDs for old & new files */
+ hid_t fcpl; /* File creation property list */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Create a file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- assert(fcpl >= 0);
+ HDassert(fcpl >= 0);
ret = H5Pset_istore_k(fcpl, ISTORE_IK);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Creating a file with the non-default file creation property list should
* create a version 1 superblock
@@ -64,15 +60,15 @@ main(void)
/* Create file with custom file creation property list */
file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
- assert(file >= 0);
+ HDassert(file >= 0);
/* Close FCPL */
ret = H5Pclose(fcpl);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Close file */
ret = H5Fclose(file);
- assert(ret >= 0);
+ HDassert(ret >= 0);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/test/gen_noencoder.c b/test/gen_noencoder.c
index 9b68bcd..fa5981e 100644
--- a/test/gen_noencoder.c
+++ b/test/gen_noencoder.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 07398d6..6bc1629 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Saturday, April 17, 2004
*
* Purpose: Create a dataset with a null dataspace and an attribute
@@ -24,8 +24,7 @@
* put into the 'test' directory in the 1.6.x branch of the library.
*/
-#include "hdf5.h"
-#include <assert.h>
+#include "h5test.h"
#define NULLFILE "tnullspace.h5"
#define NULLDATASET "null_dataset"
@@ -34,51 +33,51 @@
int
main(void)
{
- hid_t fid; /* File ID */
- hid_t gid; /* Group ID */
- hid_t sid; /* Dataspace ID */
- hid_t did; /* Dataset ID */
- hid_t attr; /* Attribute ID */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* File ID */
+ hid_t gid; /* Group ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t did; /* Dataset ID */
+ hid_t attr; /* Attribute ID */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(fid > 0);
+ HDassert(fid > 0);
sid = H5Screate(H5S_NULL);
- assert(sid > 0);
+ HDassert(sid > 0);
/* Create dataset */
did = H5Dcreate2(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(did > 0);
+ HDassert(did > 0);
/* Close the dataset */
ret = H5Dclose(did);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Open the root group */
gid = H5Gopen2(fid, "/", H5P_DEFAULT);
- assert(gid > 0);
+ HDassert(gid > 0);
/* Create an attribute for the group */
attr = H5Acreate2(gid, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
- assert(attr > 0);
+ HDassert(attr > 0);
/* Close attribute */
ret = H5Aclose(attr);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Close the group */
ret = H5Gclose(gid);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Close the dataspace */
ret = H5Sclose(sid);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Close the file */
ret = H5Fclose(fid);
- assert(ret >= 0);
+ HDassert(ret >= 0);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/test/gen_old_array.c b/test/gen_old_array.c
index a9763fa..9755896 100644
--- a/test/gen_old_array.c
+++ b/test/gen_old_array.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets with compound datatypes, one with no array
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 1b69894..1b4e0b2 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with an
diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c
index 5a17145..4412078 100644
--- a/test/gen_old_layout.c
+++ b/test/gen_old_layout.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Create two datasets (one for version 1 and one for version 2 of
diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c
index f14ecdf..0ec3486 100644
--- a/test/gen_old_mtime.c
+++ b/test/gen_old_mtime.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the older mtime information
diff --git a/test/gen_plist.c b/test/gen_plist.c
index f3834d2..10c6423 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -42,7 +42,7 @@ main(void)
hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
- double w0 = 0.5f;
+ double w0 = 0.5;
unsigned max_compact;
unsigned min_dense;
const char * c_to_f = "x+32";
@@ -56,26 +56,26 @@ main(void)
1 /*TRUE*/,
0 /*FALSE*/,
(2 * 2048 * 1024),
- 0.3f,
+ 0.3,
(64 * 1024 * 1024),
(4 * 1024 * 1024),
60000,
H5C_incr__threshold,
- 0.8f,
- 3.0f,
+ 0.8,
+ 3.0,
1 /*TRUE*/,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
- 2.0f,
- 0.25f,
+ 2.0,
+ 0.25,
H5C_decr__age_out_with_threshold,
- 0.997f,
- 0.8f,
+ 0.997,
+ 0.8,
1 /*TRUE*/,
(3 * 1024 * 1024),
3,
0 /*FALSE*/,
- 0.2f,
+ 0.2,
(256 * 2048),
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY};
H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
@@ -443,12 +443,12 @@ main(void)
static int
encode_plist(hid_t plist_id, int little_endian, int word_length, const char *filename_prefix)
{
- int fd = 0; /* file descriptor */
- herr_t ret = 0;
- void * temp_buf = NULL;
- size_t temp_size = 0;
- ssize_t write_size;
- char filename[1024];
+ int fd = 0; /* file descriptor */
+ herr_t ret = 0;
+ void * temp_buf = NULL;
+ size_t temp_size = 0;
+ ssize_t H5_ATTR_NDEBUG_UNUSED write_size;
+ char filename[1024];
/* Generate filename */
if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
diff --git a/test/gen_sizes_lheap.c b/test/gen_sizes_lheap.c
index 24ad91b..8f090e8 100644
--- a/test/gen_sizes_lheap.c
+++ b/test/gen_sizes_lheap.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, July 15, 2010
*
* Purpose: Creates a file with non-default sizes of lengths and addresses.
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index 484c1f8..5ec1f98 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, October 8, 2009
*
* Purpose: Create a file with a dataset who's raw data immediately follows
@@ -23,8 +23,7 @@
* the library on the trunk as of when this file is checked in.
*/
-#include "hdf5.h"
-#include <assert.h>
+#include "h5test.h"
#define FILENAME "specmetaread.h5"
#define DIM 10
@@ -32,14 +31,14 @@
int
main(void)
{
- hid_t fid;
- hid_t fapl;
- hid_t did;
- hid_t space;
- hsize_t dim[1] = {DIM};
- unsigned data[DIM];
- unsigned u;
- herr_t ret; /* Generic return value */
+ hid_t fid;
+ hid_t fapl;
+ hid_t did;
+ hid_t space;
+ hsize_t dim[1] = {DIM};
+ unsigned data[DIM];
+ unsigned u;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Initialize the data */
for (u = 0; u < DIM; u++)
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 7bac453..d41625a 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@hdfgroup.org>
+ * Programmer: James Laird
* Tuesday, June 6, 2006
*
* This program creates HDF5 files with user-defined links. These files
diff --git a/test/genall5.c b/test/genall5.c
index 41fd86a..05ad4a2 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -103,8 +103,6 @@ ns_grp_0(hid_t fid, const char *group_name)
HDassert(ret >= 0);
}
- return;
-
} /* ns_grp_0 */
/*-------------------------------------------------------------------------
@@ -222,7 +220,6 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name)
HDassert(ret >= 0);
}
- return;
} /* vrfy_ns_grp_0() */
/*-------------------------------------------------------------------------
@@ -363,8 +360,6 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(ret >= 0);
}
- return;
-
} /* ns_grp_c() */
/*-------------------------------------------------------------------------
@@ -640,7 +635,6 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(ret >= 0);
}
- return;
} /* vrfy_ns_grp_c() */
/*-------------------------------------------------------------------------
@@ -776,7 +770,6 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(ret >= 0);
}
- return;
} /* ns_grp_d() */
/*-------------------------------------------------------------------------
@@ -1050,8 +1043,6 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(ret >= 0);
}
- return;
-
} /* vrfy_ns_grp_d() */
/*-------------------------------------------------------------------------
@@ -1140,7 +1131,6 @@ os_grp_0(hid_t fid, const char *group_name)
}
}
- return;
} /* os_grp_0() */
/*-------------------------------------------------------------------------
@@ -1257,7 +1247,6 @@ vrfy_os_grp_0(hid_t fid, const char *group_name)
HDassert(ret >= 0);
}
- return;
} /* vrfy_os_grp_0() */
/*-------------------------------------------------------------------------
@@ -1377,7 +1366,6 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
}
}
- return;
} /* os_grp_n() */
/*-------------------------------------------------------------------------
@@ -1603,7 +1591,6 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
HDassert(ret >= 0);
}
- return;
} /* vrfy_os_grp_n() */
/*-------------------------------------------------------------------------
@@ -1700,7 +1687,6 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* ds_ctg_i */
/*-------------------------------------------------------------------------
@@ -1919,8 +1905,6 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
-
} /* vrfy_ds_ctg_i() */
/*-------------------------------------------------------------------------
@@ -2047,7 +2031,6 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* ds_chk_i */
/*-------------------------------------------------------------------------
@@ -2281,7 +2264,6 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* vrfy_ds_chk_i() */
/*-------------------------------------------------------------------------
@@ -2409,8 +2391,6 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
-
} /* ds_cpt_i() */
/*-------------------------------------------------------------------------
@@ -2624,7 +2604,6 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* vrfy_ds_cpt_i() */
/*-------------------------------------------------------------------------
@@ -2773,7 +2752,6 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* ds_ctg_v() */
/*-------------------------------------------------------------------------
@@ -3038,7 +3016,6 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
HDassert(ret >= 0);
}
- return;
} /* vrfy_ds_ctg_v() */
/*-------------------------------------------------------------------------
@@ -3266,7 +3243,6 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
vrfy_ds_ctg_v(fid, full_path, TRUE);
}
- return;
} /* create_zoo() */
/*-------------------------------------------------------------------------
@@ -3414,5 +3390,4 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
vrfy_ds_ctg_v(fid, full_path, TRUE);
}
- return;
} /* validate_zoo() */
diff --git a/test/genall5.h b/test/genall5.h
index a201b38..673b4c9 100644
--- a/test/genall5.h
+++ b/test/genall5.h
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/getname.c b/test/getname.c
index 26a3f2e..200c426 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* April 12, 2002
*
* Purpose: Tests the "ID to name" functionality
@@ -68,11 +68,11 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path)
TEST_ERROR
/* Check on name from H5Iget_name() */
- if (HDstrcmp(name, chk_name))
+ if (HDstrcmp(name, chk_name) != 0)
goto error;
/* Check on user path */
- if (HDstrcmp(user_path, chk_user_path))
+ if (HDstrcmp(user_path, chk_user_path) != 0)
goto error;
/* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */
@@ -1439,7 +1439,7 @@ test_main(hid_t file_id, hid_t fapl)
/* Check that name is longer */
if (name_len <= SMALL_NAME_BUF_SIZE)
TEST_ERROR
- if (HDstrcmp(name2, "/"))
+ if (HDstrcmp(name2, "/") != 0)
TEST_ERROR
}
@@ -1481,7 +1481,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR
/* Verify */
- if (HDstrcmp(name3, "/g17"))
+ if (HDstrcmp(name3, "/g17") != 0)
TEST_ERROR
*name3 = '\0';
@@ -1491,7 +1491,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR
/* Verify */
- if (HDstrcmp(name3, "/g"))
+ if (HDstrcmp(name3, "/g") != 0)
TEST_ERROR
HDfree(name3);
@@ -3326,7 +3326,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in /Group1");
@@ -3342,7 +3342,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to /Group1");
@@ -3358,7 +3358,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to datatype in /Group1");
@@ -3374,7 +3374,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in nested group");
@@ -3390,7 +3390,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to nested group");
@@ -3406,7 +3406,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset created via hard link");
@@ -3422,7 +3422,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR
- PASSED()
+ PASSED();
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to root group");
@@ -3438,7 +3438,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char *)buf, sizeof(buf));
if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR
- PASSED()
+ PASSED();
/* Now we mount fid2 at /Group2 and look for dataset4. It shouldn't be found */
if (H5Fmount(fid1, "/Group1/Group2", fid2, H5P_DEFAULT) < 0)
@@ -3457,7 +3457,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char *)buf, sizeof(buf));
if (namelen != 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Now we try unlinking dataset2 from the file and searching for it. It shouldn't be found */
if ((dataset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0)
@@ -3476,7 +3476,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char *)buf, sizeof(buf));
if (namelen != 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Close disk dataspace */
if (H5Sclose(sid1) < 0)
@@ -3606,7 +3606,7 @@ test_reg_ref(hid_t fapl)
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char *)buf1, NAME_BUF_SIZE);
if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5Iget_name to get name from region reference(hyperslab)");
@@ -3622,7 +3622,7 @@ test_reg_ref(hid_t fapl)
if (H5Dclose(dsetv_id) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
/* Get name of the dataset the second region reference points to using H5Rget_name */
TESTING("H5Rget_name to get name from region reference(pnt selec)");
@@ -3630,7 +3630,7 @@ test_reg_ref(hid_t fapl)
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char *)buf1, NAME_BUF_SIZE);
if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5Iget_name to get name from region reference(pnt selec)");
@@ -3647,7 +3647,7 @@ test_reg_ref(hid_t fapl)
if (H5Dclose(dsetv_id) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
if (H5Dclose(dsetr_id) < 0)
TEST_ERROR
@@ -3787,7 +3787,7 @@ main(void)
if (nerrors)
goto error;
- puts("All getname tests passed.");
+ HDputs("All getname tests passed.");
h5_cleanup(FILENAME, fapl);
@@ -3800,7 +3800,7 @@ error:
}
H5E_END_TRY;
- puts("***** GET NAME TESTS FAILED *****");
+ HDputs("***** GET NAME TESTS FAILED *****");
return 1;
}
diff --git a/test/gheap.c b/test/gheap.c
index 00c3190..158c9da 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Purpose: Tests the global heap. The global heap is the set of all
@@ -42,9 +42,9 @@
nerrors++; \
if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \
H5_FAILED(); \
- puts(MSG); \
+ HDputs(MSG); \
if (nerrors == GHEAP_REPEATED_ERR_LIM) \
- puts(" Suppressing further errors..."); \
+ HDputs(" Suppressing further errors..."); \
} /* end if */ \
} /* end GHEAP_REPEATED_ERR */
@@ -129,7 +129,7 @@ test_1(hid_t fapl)
HDputs(" Unable to read object");
nerrors++;
}
- else if (HDmemcmp(in, out, size)) {
+ else if (HDmemcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
@@ -229,7 +229,7 @@ test_2(hid_t fapl)
HDputs(" Unable to read object");
nerrors++;
}
- else if (memcmp(in, out, size)) {
+ else if (HDmemcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
diff --git a/test/h5test.c b/test/h5test.c
index 5b7b95d..b37409a 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, November 19, 1998
*
* Purpose: Provides support functions for most of the hdf5 tests cases.
@@ -23,6 +23,7 @@
#include "h5test.h"
#include "H5srcdir.h"
+#include "H5srcdir_str.h"
/* Necessary for h5_verify_cached_stabs() */
#define H5G_FRIEND /*suppress error about including H5Gpkg */
@@ -100,6 +101,12 @@ static const char *multi_letters = "msbrglo";
/* The # of seconds to wait for the message file--used by h5_wait_message() */
#define MESSAGE_TIMEOUT 300 /* Timeout in seconds */
+/* Buffer to construct path in and return pointer to */
+static char srcdir_path[1024] = "";
+
+/* Buffer to construct file in and return pointer to */
+static char srcdir_testpath[1024] = "";
+
/* The strings that correspond to library version bounds H5F_libver_t in H5Fpublic.h */
/* This is used by h5_get_version_string() */
const char *LIBVER_NAMES[] = {"earliest", /* H5F_LIBVER_EARLIEST = 0 */
@@ -163,8 +170,6 @@ h5_clean_files(const char *base_name[], hid_t fapl)
/* Close the FAPL used to access the file */
H5Pclose(fapl);
-
- return;
} /* end h5_clean_files() */
/*-------------------------------------------------------------------------
@@ -190,7 +195,7 @@ h5_clean_files(const char *base_name[], hid_t fapl)
* sub_filename in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
void
h5_delete_test_file(const char *base_name, hid_t fapl)
{
@@ -241,9 +246,8 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
HDremove(filename);
} /* end driver selection tree */
- return;
} /* end h5_delete_test_file() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: h5_delete_all_test_files
@@ -274,7 +278,6 @@ h5_delete_all_test_files(const char *base_name[], hid_t fapl)
h5_delete_test_file(base_name[i], fapl);
} /* end for */
- return;
} /* end h5_delete_all_test_files() */
/*-------------------------------------------------------------------------
@@ -333,8 +336,6 @@ h5_test_shutdown(void)
/* Restore the original error reporting routine */
h5_restore_err();
-
- return;
} /* end h5_test_shutdown() */
/*-------------------------------------------------------------------------
@@ -441,8 +442,6 @@ h5_test_init(void)
HDassert(err_func == NULL);
H5Eget_auto2(H5E_DEFAULT, &err_func, NULL);
H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
-
- return;
} /* end h5_test_init() */
/*-------------------------------------------------------------------------
@@ -1160,10 +1159,8 @@ h5_show_hostname(void)
else
HDprintf("thread 0.");
}
-#elif defined(H5_HAVE_THREADSAFE)
- HDprintf("thread %lu.", HDpthread_self_ulong());
#else
- HDprintf("thread 0.");
+ HDprintf("thread %" PRIu64 ".", H5TS_thread_id());
#endif
#ifdef H5_HAVE_WIN32_API
@@ -1349,7 +1346,7 @@ h5_dump_info_object(MPI_Info info)
* temp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
h5_stat_size_t
h5_get_file_size(const char *filename, hid_t fapl)
{
@@ -1454,7 +1451,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
return (-1);
} /* end get_file_size() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*
* This routine is designed to provide equivalent functionality to 'printf'
@@ -2040,7 +2037,8 @@ h5_get_dummy_vol_class(void)
/* Fill in the minimum parameters to make a VOL connector class that
* can be registered.
*/
- vol_class->name = "dummy";
+ vol_class->version = H5VL_VERSION;
+ vol_class->name = "dummy";
return vol_class;
@@ -2064,3 +2062,265 @@ h5_get_version_string(H5F_libver_t libver)
{
return (LIBVER_NAMES[libver]);
} /* end of h5_get_version_string */
+
+/*-------------------------------------------------------------------------
+ * Function: h5_compare_file_bytes()
+ *
+ * Purpose: Helper function to compare two files byte-for-byte.
+ *
+ * Return: Success: 0, if files are identical
+ * Failure: -1, if files differ
+ *
+ * Programmer: Binh-Minh Ribler
+ * October, 2018
+ *-------------------------------------------------------------------------
+ */
+int
+h5_compare_file_bytes(char *f1name, char *f2name)
+{
+ FILE *f1ptr = NULL; /* two file pointers */
+ FILE *f2ptr = NULL;
+ off_t f1size = 0; /* size of the files */
+ off_t f2size = 0;
+ char f1char = 0; /* one char from each file */
+ char f2char = 0;
+ off_t ii = 0;
+ int ret_value = 0; /* for error handling */
+
+ /* Open files for reading */
+ f1ptr = HDfopen(f1name, "rb");
+ if (f1ptr == NULL) {
+ HDfprintf(stderr, "Unable to fopen() %s\n", f1name);
+ ret_value = -1;
+ goto done;
+ }
+ f2ptr = HDfopen(f2name, "rb");
+ if (f2ptr == NULL) {
+ HDfprintf(stderr, "Unable to fopen() %s\n", f2name);
+ ret_value = -1;
+ goto done;
+ }
+
+ /* Get the file sizes and verify that they equal */
+ HDfseek(f1ptr, 0, SEEK_END);
+ f1size = HDftell(f1ptr);
+
+ HDfseek(f2ptr, 0, SEEK_END);
+ f2size = HDftell(f2ptr);
+
+ if (f1size != f2size) {
+ HDfprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", (hsize_t)f1size,
+ (hsize_t)f2size);
+ ret_value = -1;
+ goto done;
+ }
+
+ /* Compare each byte and fail if a difference is found */
+ HDrewind(f1ptr);
+ HDrewind(f2ptr);
+ for (ii = 0; ii < f1size; ii++) {
+ if (HDfread(&f1char, 1, 1, f1ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
+ if (HDfread(&f2char, 1, 1, f2ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
+ if (f1char != f2char) {
+ HDfprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", (hsize_t)ii, f1char, f2char);
+ ret_value = -1;
+ goto done;
+ }
+ }
+
+done:
+ if (f1ptr)
+ HDfclose(f1ptr);
+ if (f2ptr)
+ HDfclose(f2ptr);
+ return ret_value;
+} /* end h5_compare_file_bytes() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5_get_srcdir_filename
+ *
+ * Purpose: Append the test file name to the srcdir path and return the whole string
+ *
+ * Return: The string
+ *
+ *-------------------------------------------------------------------------
+ */
+const char *
+H5_get_srcdir_filename(const char *filename)
+{
+ const char *srcdir = H5_get_srcdir();
+
+ /* Check for error */
+ if (NULL == srcdir)
+ return (NULL);
+ else {
+ /* Build path to test file */
+ if ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
+ HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
+ return (srcdir_testpath);
+ } /* end if */
+ else
+ return (NULL);
+ } /* end else */
+} /* end H5_get_srcdir_filename() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5_get_srcdir
+ *
+ * Purpose: Just return the srcdir path
+ *
+ * Return: The string
+ *
+ *-------------------------------------------------------------------------
+ */
+const char *
+H5_get_srcdir(void)
+{
+ const char *srcdir = HDgetenv("srcdir");
+
+ /* Check for using the srcdir from configure time */
+ if (NULL == srcdir)
+ srcdir = config_srcdir;
+
+ /* Build path to all test files */
+ if ((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
+ HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
+ return (srcdir_path);
+ } /* end if */
+ else
+ return (NULL);
+} /* end H5_get_srcdir() */
+
+/*-------------------------------------------------------------------------
+ * Function: h5_duplicate_file_by_bytes
+ *
+ * Purpose: Duplicate a file byte-for-byte at filename/path 'orig'
+ * to a new (or replaced) file at 'dest'.
+ *
+ * Return: Success: 0, completed successfully
+ * Failure: -1
+ *
+ * Programmer: Jake Smith
+ * 24 June 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+h5_duplicate_file_by_bytes(const char *orig, const char *dest)
+{
+ FILE * orig_ptr = NULL;
+ FILE * dest_ptr = NULL;
+ hsize_t fsize = 0;
+ hsize_t read_size = 0;
+ hsize_t max_buf = 0;
+ void * dup_buf = NULL;
+ int ret_value = 0;
+
+ max_buf = 4096 * sizeof(char);
+
+ orig_ptr = HDfopen(orig, "rb");
+ if (NULL == orig_ptr) {
+ ret_value = -1;
+ goto done;
+ }
+
+ HDfseek(orig_ptr, 0, SEEK_END);
+ fsize = (hsize_t)HDftell(orig_ptr);
+ HDrewind(orig_ptr);
+
+ dest_ptr = HDfopen(dest, "wb");
+ if (NULL == dest_ptr) {
+ ret_value = -1;
+ goto done;
+ }
+
+ read_size = MIN(fsize, max_buf);
+ dup_buf = HDmalloc(read_size);
+ if (NULL == dup_buf) {
+ ret_value = -1;
+ goto done;
+ }
+
+ while (read_size > 0) {
+ if (HDfread(dup_buf, read_size, 1, orig_ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
+ HDfwrite(dup_buf, read_size, 1, dest_ptr);
+ fsize -= read_size;
+ read_size = MIN(fsize, max_buf);
+ }
+
+done:
+ if (orig_ptr != NULL)
+ HDfclose(orig_ptr);
+ if (dest_ptr != NULL)
+ HDfclose(dest_ptr);
+ if (dup_buf != NULL)
+ HDfree(dup_buf);
+ return ret_value;
+} /* end h5_duplicate_file_by_bytes() */
+
+/*-------------------------------------------------------------------------
+ * Function: h5_check_if_file_locking_enabled
+ *
+ * Purpose: Checks if file locking is enabled on this file system.
+ *
+ * Return: SUCCEED/FAIL
+ * are_enabled will be FALSE if file locking is disabled on
+ * the file system of if there were errors.
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+h5_check_if_file_locking_enabled(hbool_t *is_enabled)
+{
+ const char *filename = "locking_test_file";
+ int pmode = O_RDWR | O_CREAT | O_TRUNC;
+ int fd = -1;
+
+ *is_enabled = TRUE;
+
+ if ((fd = HDopen(filename, pmode, H5_POSIX_CREATE_MODE_RW)) < 0)
+ goto error;
+
+ /* Test HDflock() to see if it works */
+ if (HDflock(fd, LOCK_EX | LOCK_NB) < 0) {
+ if (ENOSYS == errno) {
+ /* When errno is set to ENOSYS, the file system does not support
+ * locking, so ignore it. This is most frequently used on
+ * Lustre. If we also want to check for disabled NFS locks
+ * we'll need to check for ENOLCK, too. That isn't done by
+ * default here since that could also represent an actual
+ * error condition.
+ */
+ errno = 0;
+ *is_enabled = FALSE;
+ }
+ else
+ goto error;
+ }
+ if (HDflock(fd, LOCK_UN) < 0)
+ goto error;
+
+ if (HDclose(fd) < 0)
+ goto error;
+ if (HDremove(filename) < 0)
+ goto error;
+
+ return SUCCEED;
+
+error:
+ *is_enabled = FALSE;
+ if (fd > -1) {
+ HDclose(fd);
+ HDremove(filename);
+ }
+ return FAIL;
+} /* end h5_check_if_file_locking_enabled() */
diff --git a/test/h5test.h b/test/h5test.h
index fd0eec0..0d7dade 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -6,19 +6,19 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, November 20, 1998
*
* Purpose: Test support stuff.
*/
-#ifndef _H5TEST_H
-#define _H5TEST_H
+#ifndef H5TEST_H
+#define H5TEST_H
/*
* Include required headers. This file tests internal library functions,
@@ -111,10 +111,10 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
HDfflush(stdout); \
}
#define PASSED() \
- { \
+ do { \
HDputs(" PASSED"); \
HDfflush(stdout); \
- }
+ } while (0)
#define H5_FAILED() \
{ \
HDputs("*FAILED*"); \
@@ -173,6 +173,64 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#define H5_FILEACCESS_VFD 0x01
#define H5_FILEACCESS_LIBVER 0x02
+/* Macros to create and fill 2D arrays with a single heap allocation.
+ * These can be used to replace large stack and global arrays which raise
+ * warnings.
+ *
+ * The macros make a single heap allocation large enough to hold all the
+ * pointers and the data elements. The first part of the allocation holds
+ * the pointers, and the second part holds the data as a contiguous block
+ * in row-major order.
+ *
+ * To pass the data block to calls like H5Dread(), pass a pointer to the
+ * first array element as the data pointer (e.g., array[0] in a 2D array).
+ *
+ * The fill macro just fills the array with an increasing count value.
+ *
+ * Usage:
+ *
+ * int **array;
+ *
+ * H5TEST_ALLOCATE_2D_ARRAY(array, int, 5, 10);
+ *
+ * H5TEST_FILL_2D_ARRAY(array, int, 5, 10);
+ *
+ * (do stuff)
+ *
+ * HDfree(array);
+ */
+#define H5TEST_ALLOCATE_2D_ARRAY(ARR, TYPE, DIMS_I, DIMS_J) \
+ do { \
+ /* Prefix with h5taa to avoid shadow warnings */ \
+ size_t h5taa_pointers_size = 0; \
+ size_t h5taa_data_size = 0; \
+ int h5taa_i; \
+ \
+ h5taa_pointers_size = (DIMS_I) * sizeof(TYPE *); \
+ h5taa_data_size = (DIMS_I) * (DIMS_J) * sizeof(TYPE); \
+ \
+ ARR = (TYPE **)HDmalloc(h5taa_pointers_size + h5taa_data_size); \
+ \
+ ARR[0] = (TYPE *)(ARR + (DIMS_I)); \
+ \
+ for (h5taa_i = 1; h5taa_i < (DIMS_I); h5taa_i++) \
+ ARR[h5taa_i] = ARR[h5taa_i - 1] + (DIMS_J); \
+ } while (0)
+
+#define H5TEST_FILL_2D_ARRAY(ARR, TYPE, DIMS_I, DIMS_J) \
+ do { \
+ /* Prefix with h5tfa to avoid shadow warnings */ \
+ int h5tfa_i = 0; \
+ int h5tfa_j = 0; \
+ TYPE h5tfa_count = 0; \
+ \
+ for (h5tfa_i = 0; h5tfa_i < (DIMS_I); h5tfa_i++) \
+ for (h5tfa_j = 0; h5tfa_j < (DIMS_J); h5tfa_j++) { \
+ ARR[h5tfa_i][h5tfa_j] = h5tfa_count; \
+ h5tfa_count++; \
+ } \
+ } while (0)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -198,6 +256,9 @@ H5TEST_DLL herr_t h5_verify_cached_stabs(const char *base_name[], hid_t
H5TEST_DLL H5FD_class_t *h5_get_dummy_vfd_class(void);
H5TEST_DLL H5VL_class_t *h5_get_dummy_vol_class(void);
H5TEST_DLL const char * h5_get_version_string(H5F_libver_t libver);
+H5TEST_DLL int h5_compare_file_bytes(char *fname1, char *fname2);
+H5TEST_DLL int h5_duplicate_file_by_bytes(const char *orig, const char *dest);
+H5TEST_DLL herr_t h5_check_if_file_locking_enabled(hbool_t *are_enabled);
/* Functions that will replace components of a FAPL */
H5TEST_DLL herr_t h5_get_vfd_fapl(hid_t fapl_id);
diff --git a/test/hdfs.c b/test/hdfs.c
index 4c7d045..5465e77 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,7 +19,7 @@
*
* Demonstrates basic use cases and fapl interaction.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2018-04-23
*/
@@ -29,7 +29,6 @@
#ifdef H5_HAVE_LIBHDFS
#define HDFS_TEST_DEBUG 0
#define HDFS_TEST_MAX_BUF_SIZE 256
-#endif /* H5_HAVE_LIBHDFS */
/*****************************************************************************
*
@@ -231,9 +230,10 @@
*/
#define JSERR_STR(expected, actual, reason) \
{ \
+ const char *_reason = reason; \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
+ if (_reason != NULL) { \
+ HDprintf("%s\n", _reason); \
} \
else { \
HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
@@ -303,7 +303,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -348,7 +348,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -359,11 +359,8 @@
* OTHER MACROS AND DEFINITIONS *
********************************/
-/* copied from src/hdfs.c
- */
-#ifdef H5_HAVE_LIBHDFS
+/* copied from src/hdfs.c */
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
-#endif /* H5_HAVE_LIBHDFS */
#define HDFS_NAMENODE_NAME_MAX_SIZE 128
@@ -371,12 +368,10 @@
* FILE-LOCAL GLOBAL VARIABLES *
*******************************/
-#ifdef H5_HAVE_LIBHDFS
static const char filename_missing[] = "/tmp/missing.txt";
static const char filename_bard[] = "/tmp/t8.shakespeare.txt";
static const char filename_raven[] = "/tmp/Poe_Raven.txt";
static const char filename_example_h5[] = "/tmp/t.h5";
-#endif /* H5_HAVE_LIBHDFS */
static H5FD_hdfs_fapl_t default_fa = {
1, /* fa version */
@@ -386,6 +381,7 @@ static H5FD_hdfs_fapl_t default_fa = {
"", /* kerberos path */
1024, /* buffer size */
};
+#endif /* H5_HAVE_LIBHDFS */
/******************
* TEST FUNCTIONS *
@@ -415,6 +411,14 @@ static H5FD_hdfs_fapl_t default_fa = {
static int
test_fapl_config_validation(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl configuration validation");
+ SKIPPED();
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
+ return 0;
+
+#else
/*********************
* test-local macros *
*********************/
@@ -560,9 +564,10 @@ test_fapl_config_validation(void)
JSVERIFY(config.version, fa_fetch.version, "version number mismatch")
JSVERIFY(config.namenode_port, fa_fetch.namenode_port, "namenode port mismatch")
JSVERIFY(config.stream_buffer_size, fa_fetch.stream_buffer_size, "streambuffer size mismatch")
- JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, NULL)
- JSVERIFY_STR(config.user_name, fa_fetch.user_name, NULL)
- JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, NULL)
+ JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, "node name mismatch")
+ JSVERIFY_STR(config.user_name, fa_fetch.user_name, "user name mismatch")
+ JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache,
+ "kerberos ticket cache mismatch")
}
/*-----------------------------
@@ -590,6 +595,7 @@ error:
H5E_END_TRY;
}
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_fapl_config_validation() */
@@ -615,14 +621,22 @@ error:
static int
test_hdfs_fapl(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl ");
+ SKIPPED();
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
+ return 0;
+
+#else
/************************
* test-local variables *
************************/
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- H5FD_hdfs_fapl_t hdfs_fa_0 = {
+ hid_t fapl_id = -1; /* file access property list ID */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ H5FD_hdfs_fapl_t hdfs_fa_0 = {
1, /* version*/
"", /* node name */
9000, /* node port */
@@ -667,6 +681,7 @@ error:
H5E_END_TRY;
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_hdfs_fapl() */
@@ -695,8 +710,8 @@ test_vfd_open(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD-level open");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -717,10 +732,10 @@ test_vfd_open(void)
struct test_condition {
const char *message;
const char *url;
- unsigned flags;
- int which_fapl;
- haddr_t maxaddr;
- hbool_t might_use_other_driver;
+ unsigned flags;
+ int which_fapl;
+ haddr_t maxaddr;
+ hbool_t might_use_other_driver;
};
/************************
@@ -809,11 +824,11 @@ test_vfd_open(void)
FALSE,
},
};
- unsigned i = 0;
+ unsigned i = 0;
unsigned failing_conditions_count = 10;
- H5FD_t * fd = NULL;
- hid_t fapl_hdfs = -1;
- hid_t fapl_unconfigured = -1;
+ H5FD_t *fd = NULL;
+ hid_t fapl_hdfs = -1;
+ hid_t fapl_unconfigured = -1;
TESTING("HDFS VFD-level open");
@@ -831,8 +846,8 @@ test_vfd_open(void)
/* all the test cases that will _not_ open
*/
for (i = 0; i < failing_conditions_count; i++) {
- struct test_condition T = failing_conditions[i];
- hid_t fapl_id = H5P_DEFAULT;
+ struct test_condition T = failing_conditions[i];
+ hid_t fapl_id = H5P_DEFAULT;
fd = NULL;
@@ -951,8 +966,8 @@ test_eof_eoa(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -970,7 +985,7 @@ test_eof_eoa(void)
************************/
H5FD_t *fd_shakespeare = NULL;
- hid_t fapl_id = -1;
+ hid_t fapl_id = -1;
TESTING("HDFS eof/eoa gets and sets");
@@ -991,7 +1006,7 @@ test_eof_eoa(void)
/* verify as found
*/
- JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), NULL)
+ JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), "EOF mismatch")
JSVERIFY(H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), H5FDget_eof(fd_shakespeare, H5FD_MEM_DRAW),
"mismatch between DEFAULT and RAW memory types")
JSVERIFY(0, H5FDget_eoa(fd_shakespeare, H5FD_MEM_DEFAULT), "EoA should be unset by H5FDopen")
@@ -1064,16 +1079,16 @@ test_H5FDread_without_eoa_set_fails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
- char buffer[HDFS_TEST_MAX_BUF_SIZE];
- unsigned int i = 0;
- H5FD_t * file_shakespeare = NULL;
- hid_t fapl_id = -1;
+ char buffer[HDFS_TEST_MAX_BUF_SIZE];
+ unsigned int i = 0;
+ H5FD_t *file_shakespeare = NULL;
+ hid_t fapl_id = -1;
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
@@ -1166,8 +1181,8 @@ test_read(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read/range-gets");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1181,10 +1196,10 @@ test_read(void)
*************************/
struct testcase {
const char *message; /* purpose of test case */
- haddr_t eoa_set; /* set file EOA to this prior to read */
- size_t addr; /* offset of read in file */
- size_t len; /* length of read in file */
- herr_t success; /* expected return value of read function */
+ haddr_t eoa_set; /* set file EOA to this prior to read */
+ size_t addr; /* offset of read in file */
+ size_t len; /* length of read in file */
+ herr_t success; /* expected return value of read function */
const char *expected; /* expected contents of buffer; failure ignores */
};
@@ -1241,14 +1256,14 @@ test_read(void)
NULL,
},
};
- unsigned testcase_count = 6;
- unsigned test_i = 0;
+ unsigned testcase_count = 6;
+ unsigned test_i = 0;
struct testcase test;
- herr_t open_return = FAIL;
- char buffer[HDFS_TEST_MAX_BUF_SIZE];
- unsigned int i = 0;
- H5FD_t * file_raven = NULL;
- hid_t fapl_id = -1;
+ herr_t open_return = FAIL;
+ char buffer[HDFS_TEST_MAX_BUF_SIZE];
+ unsigned int i = 0;
+ H5FD_t *file_raven = NULL;
+ hid_t fapl_id = -1;
TESTING("HDFS VFD read/range-gets");
@@ -1273,7 +1288,7 @@ test_read(void)
HADDR_UNDEF); /* Demonstrate success with "automatic" value */
FAIL_IF(NULL == file_raven)
- JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), NULL)
+ JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), "EOF mismatch")
/*********
* TESTS *
@@ -1285,7 +1300,7 @@ test_read(void)
* per-test setup *
* -------------- */
- test = cases[test_i];
+ test = cases[test_i];
open_return = FAIL;
FAIL_IF(HDFS_TEST_MAX_BUF_SIZE < test.len) /* buffer too small! */
@@ -1380,8 +1395,8 @@ test_noops_and_autofails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1398,8 +1413,8 @@ test_noops_and_autofails(void)
* test-local variables *
************************/
- hid_t fapl_id = -1;
- H5FD_t * file = NULL;
+ hid_t fapl_id = -1;
+ H5FD_t *file = NULL;
const char data[36] = "The Force shall be with you, always";
TESTING("HDFS VFD always-fail and no-op routines");
@@ -1436,8 +1451,8 @@ test_noops_and_autofails(void)
/* no-op calls to `lock()` and `unlock()`
*/
JSVERIFY(SUCCEED, H5FDlock(file, TRUE), "lock always succeeds; has no effect")
- JSVERIFY(SUCCEED, H5FDlock(file, FALSE), NULL)
- JSVERIFY(SUCCEED, H5FDunlock(file), NULL)
+ JSVERIFY(SUCCEED, H5FDlock(file, FALSE), "lock issue")
+ JSVERIFY(SUCCEED, H5FDunlock(file), "unlock issue")
/* Lock/unlock with null file or similar error crashes tests.
* HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()`
*/
@@ -1535,8 +1550,8 @@ test_H5F_integration(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1553,7 +1568,7 @@ test_H5F_integration(void)
* test-local variables *
************************/
- hid_t file = -1;
+ hid_t file = -1;
hid_t fapl_id = -1;
TESTING("HDFS file access through HD5F library (H5F API)");
@@ -1604,7 +1619,7 @@ error:
#if HDFS_TEST_DEBUG
HDprintf("\nerror!");
- fflush(stdout);
+ HDfflush(stdout);
#endif /* HDFS_TEST_DEBUG */
if (fapl_id >= 0) {
@@ -1647,6 +1662,7 @@ main(void)
* commence tests *
******************/
+#ifdef H5_HAVE_LIBHDFS
static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;
@@ -1658,6 +1674,7 @@ main(void)
HDstrncpy(/* TODO: error-check? */
default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
}
+#endif /* H5_HAVE_LIBHDFS */
h5_reset();
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 57deb5f..1f57e3b 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, October 10, 1997
*
* Purpose: Hyperslab operations are rather complex, so this file
@@ -177,7 +177,7 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
} /* end else */
HDsprintf(s, "Testing hyperslab fill %-11s variable hyperslab", dim);
HDprintf("%-70s", s);
- fflush(stdout);
+ HDfflush(stdout);
/* Allocate array */
if (NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz)))
@@ -257,7 +257,7 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(dst);
@@ -366,7 +366,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
HDsprintf(s, "Testing hyperslab copy %-11s %s", dim, sub);
HDprintf("%-70s", s);
- fflush(stdout);
+ HDfflush(stdout);
/*
* Allocate arrays
@@ -526,7 +526,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -575,7 +575,7 @@ test_multifill(size_t nx)
hsize_t i, j;
HDprintf("%-70s", "Testing multi-byte fill value");
- fflush(stdout);
+ HDfflush(stdout);
/* Initialize the source and destination */
if (NULL == (src = (struct a_struct *)HDmalloc(nx * sizeof(*src))))
@@ -644,7 +644,7 @@ test_multifill(size_t nx)
} /* end if */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -687,7 +687,7 @@ test_endian(size_t nx)
hsize_t i, j;
HDprintf("%-70s", "Testing endian conversion by stride");
- fflush(stdout);
+ HDfflush(stdout);
/* Initialize arrays */
if (NULL == (src = (uint8_t *)HDmalloc(nx * 4)))
@@ -730,7 +730,7 @@ test_endian(size_t nx)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -773,7 +773,7 @@ test_transpose(size_t nx, size_t ny)
HDsprintf(s, "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny);
HDprintf("%-70s", s);
- fflush(stdout);
+ HDfflush(stdout);
/* Initialize */
if (NULL == (src = (int *)HDmalloc(nx * ny * sizeof(*src))))
@@ -824,7 +824,7 @@ test_transpose(size_t nx, size_t ny)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(src);
HDfree(dst);
@@ -872,7 +872,7 @@ test_sub_super(size_t nx, size_t ny)
HDsprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
(unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
HDprintf("%-70s", s);
- fflush(stdout);
+ HDfflush(stdout);
/* Initialize */
if (NULL == (full = (uint8_t *)HDmalloc(4 * nx * ny)))
@@ -913,7 +913,7 @@ test_sub_super(size_t nx, size_t ny)
} /* end if */
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
/*
* Test replicating pixels to produce an image twice as large in each
@@ -922,7 +922,7 @@ test_sub_super(size_t nx, size_t ny)
HDsprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx, (unsigned long)ny,
(unsigned long)(2 * nx), (unsigned long)(2 * ny));
HDprintf("%-70s", s);
- fflush(stdout);
+ HDfflush(stdout);
/* Setup stride */
size[0] = nx;
@@ -971,7 +971,7 @@ test_sub_super(size_t nx, size_t ny)
} /* end for */
} /* end for */
- PASSED()
+ PASSED();
HDfree(full);
HDfree(half);
@@ -1117,8 +1117,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
/* Check computed coordinates */
for (v = 0; v < ARRAY_OFFSET_NDIMS; v++)
if (coords[v] != new_coords[v]) {
- HDfprintf(stderr, "coords[%u]=%Hu, new_coords[%u]=%Hu\n", (unsigned)v, coords[v], (unsigned)v,
- new_coords[v]);
+ HDfprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v,
+ coords[v], v, new_coords[v]);
TEST_ERROR;
} /* end if */
} /* end for */
diff --git a/test/istore.c b/test/istore.c
index 10a966a..c75b8bf 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 15, 1997
*
* Purpose: Tests various aspects of indexed raw data storage.
@@ -376,7 +376,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
HDfprintf(stderr, " Read failed: ctr=%lu\n", (unsigned long)ctr);
goto error;
}
- if (HDmemcmp(buf, check, (size_t)nelmts)) {
+ if (HDmemcmp(buf, check, (size_t)nelmts) != 0) {
H5_FAILED();
HDfprintf(stderr, " Read check failed: ctr=%lu\n", (unsigned long)ctr);
HDfprintf(stderr, " Wrote:\n");
@@ -619,13 +619,13 @@ main(int argc, char *argv[])
else {
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!strcmp(argv[i], "small")) {
+ if (!HDstrcmp(argv[i], "small")) {
size_of_test |= TEST_SMALL;
}
- else if (!strcmp(argv[i], "medium")) {
+ else if (!HDstrcmp(argv[i], "medium")) {
size_of_test |= TEST_MEDIUM;
}
- else if (!strcmp(argv[i], "large")) {
+ else if (!HDstrcmp(argv[i], "large")) {
size_of_test |= TEST_LARGE;
}
else {
diff --git a/test/lheap.c b/test/lheap.c
index 0bcc8ea..5c1b5ec 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Purpose: Test local heaps used by symbol tables (groups).
@@ -103,7 +103,7 @@ main(void)
if (j > 4)
buf[j] = '\0';
- if (UFAIL == (obj[i] = H5HL_insert(f, heap, strlen(buf) + 1, buf))) {
+ if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -155,7 +155,7 @@ main(void)
goto error;
}
- if (strcmp(s, buf)) {
+ if (HDstrcmp(s, buf) != 0) {
H5_FAILED();
HDprintf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
HDprintf(" got: \"%s\"\n", s);
diff --git a/test/links.c b/test/links.c
index 903e95a..4600ebf 100644
--- a/test/links.c
+++ b/test/links.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -140,7 +140,7 @@ const char *FILENAME[] = {"links0",
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F
+#define FILTER_FILESIZE_MAX_FRACTION 0.9
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
@@ -698,7 +698,7 @@ cklinks(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/d1")) {
+ if (HDstrcmp(linkval, "/d1") != 0) {
H5_FAILED();
HDputs(" Soft link test failed. Wrong link value");
TEST_ERROR
@@ -729,7 +729,7 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "foobar")) {
+ if (HDstrcmp(linkval, "foobar") != 0) {
H5_FAILED();
HDputs(" Dangling link test failed. Wrong link value");
TEST_ERROR
@@ -760,7 +760,7 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive")) {
+ if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
HDputs(" Recursive link test failed. Wrong link value");
TEST_ERROR
@@ -1059,7 +1059,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/hard21"))
+ if (HDstrcmp(objname, "/hard21") != 0)
TEST_ERROR
/* Create object in hard-linked group */
@@ -1093,7 +1093,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft16"))
+ if (HDstrcmp(objname, "/soft16") != 0)
TEST_ERROR
/* Create object using soft links */
@@ -1962,7 +1962,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(tmpstr, "comment"))
+ if (HDstrcmp(tmpstr, "comment") != 0)
TEST_ERROR
/* Create links using H5Glink and H5Glink2 */
@@ -1978,7 +1978,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
/* Test getting the names for objects */
if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(tmpstr, "link_to_group2"))
+ if (HDstrcmp(tmpstr, "link_to_group2") != 0)
TEST_ERROR
H5E_BEGIN_TRY
{
@@ -2015,7 +2015,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) {
+ if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2028,7 +2028,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) {
+ if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2045,7 +2045,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp("link_to_group1", tmpstr))
+ if (HDstrcmp("link_to_group1", tmpstr) != 0)
TEST_ERROR
/* Test non-existing links with H5Gget_objinfo */
@@ -2066,7 +2066,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp("dangle", tmpstr))
+ if (HDstrcmp("dangle", tmpstr) != 0)
TEST_ERROR
/* Test H5Gmove and H5Gmove2 */
@@ -2213,7 +2213,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/d1")) {
+ if (HDstrcmp(linkval, "/d1") != 0) {
H5_FAILED();
HDputs(" Soft link test failed. Wrong link value");
TEST_ERROR
@@ -2244,7 +2244,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "foobar")) {
+ if (HDstrcmp(linkval, "foobar") != 0) {
H5_FAILED();
HDputs(" Dangling link test failed. Wrong link value");
TEST_ERROR
@@ -2275,7 +2275,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive")) {
+ if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
HDputs(" Recursive link test failed. Wrong link value");
TEST_ERROR
@@ -2812,12 +2812,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -2840,12 +2840,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -2864,7 +2864,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/"))
+ if (HDstrcmp(objname, "/") != 0)
TEST_ERROR
/* Create object in external file */
@@ -2909,11 +2909,11 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/new_group"))
+ if (HDstrcmp(objname, "/new_group") != 0)
TEST_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/newer_group"))
+ if (HDstrcmp(objname, "/newer_group") != 0)
TEST_ERROR
/* Close opened objects */
@@ -3061,9 +3061,9 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2))
+ if (HDstrcmp(file_name, filename2) != 0)
TEST_ERROR
- if (HDstrcmp(object_name, "/dst"))
+ if (HDstrcmp(object_name, "/dst") != 0)
TEST_ERROR
/* Query information about object that external link points to */
@@ -3257,7 +3257,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(buf, "comment"))
+ if (HDstrcmp(buf, "comment") != 0)
TEST_ERROR
/* Test H5*open */
@@ -3674,7 +3674,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group"))
+ if (HDstrcmp(objname, "/group") != 0)
TEST_ERROR
/* Create object in group */
@@ -3694,7 +3694,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group/new_group"))
+ if (HDstrcmp(objname, "/group/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -3857,7 +3857,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME))
+ if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR
/* Create object in group */
@@ -3877,7 +3877,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/rereg_target/new_group"))
+ if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -4221,7 +4221,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft17"))
+ if (HDstrcmp(objname, "/soft17") != 0)
TEST_ERROR
/* Create group using soft link */
@@ -4265,7 +4265,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft4"))
+ if (HDstrcmp(objname, "/soft4") != 0)
TEST_ERROR
/* Test other functions that should use a LAPL */
@@ -4880,7 +4880,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4889,7 +4889,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order if there is no creation order index, since
@@ -4919,7 +4919,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4928,7 +4928,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
} /* end if */
@@ -4953,7 +4953,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4962,7 +4962,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Verify the link information for first link, in increasing link name order */
@@ -4985,7 +4985,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4994,7 +4994,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order queries on link name order, since there's not
@@ -5021,7 +5021,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -5030,7 +5030,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Success */
@@ -5377,7 +5377,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5385,7 +5385,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Verify link information (in native order - native is increasing) */
@@ -5400,7 +5400,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5408,7 +5408,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Make link name for decreasing order queries */
@@ -5429,7 +5429,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5437,7 +5437,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5663,7 +5663,7 @@ delete_by_idx_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5737,7 +5737,7 @@ delete_by_idx_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5816,7 +5816,7 @@ delete_by_idx_deprec(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5850,7 +5850,7 @@ delete_by_idx_deprec(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6017,7 +6017,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6091,7 +6091,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6125,7 +6125,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6207,7 +6207,7 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6707,7 +6707,7 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u",
(info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -7130,12 +7130,12 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -7158,12 +7158,12 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -7182,7 +7182,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/"))
+ if (HDstrcmp(objname, "/") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7227,11 +7227,11 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/new_group"))
+ if (HDstrcmp(objname, "/new_group") != 0)
TEST_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/newer_group"))
+ if (HDstrcmp(objname, "/newer_group") != 0)
TEST_ERROR
/* Close opened objects */
@@ -7353,7 +7353,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7383,7 +7383,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C/new_group"))
+ if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7525,7 +7525,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7555,7 +7555,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C/new_group"))
+ if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7671,7 +7671,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X"))
+ if (HDstrcmp(objname, "/X") != 0)
TEST_ERROR
/* Create object through external link */
@@ -7693,7 +7693,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/new_group"))
+ if (HDstrcmp(objname, "/X/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7878,7 +7878,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final"))
+ if (HDstrcmp(objname, "/final") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7908,7 +7908,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final/new_group"))
+ if (HDstrcmp(objname, "/final/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -8070,7 +8070,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final"))
+ if (HDstrcmp(objname, "/final") != 0)
TEST_ERROR
/* Create object in external file */
@@ -9841,13 +9841,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data;
/* Verify file and object names are correct */
- if (HDstrcmp(parent_file, op_data->parent_file))
+ if (HDstrcmp(parent_file, op_data->parent_file) != 0)
return FAIL;
- if (HDstrcmp(parent_group, "/group1"))
+ if (HDstrcmp(parent_group, "/group1") != 0)
return FAIL;
- if (HDstrcmp(target_file, op_data->target_file))
+ if (HDstrcmp(target_file, op_data->target_file) != 0)
return FAIL;
- if (HDstrcmp(target_obj, "/"))
+ if (HDstrcmp(target_obj, "/") != 0)
return FAIL;
/* Set flags to be read-write */
@@ -11110,9 +11110,9 @@ external_link_query(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2))
+ if (HDstrcmp(file_name, filename2) != 0)
TEST_ERROR
- if (HDstrcmp(object_name, "/dst"))
+ if (HDstrcmp(object_name, "/dst") != 0)
TEST_ERROR
/* Query information about object that external link points to */
@@ -11509,7 +11509,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11569,7 +11569,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11616,7 +11616,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Move external link back to original location */
@@ -11626,7 +11626,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11800,7 +11800,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11849,7 +11849,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -12042,7 +12042,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(buf, "comment"))
+ if (HDstrcmp(buf, "comment") != 0)
TEST_ERROR
/* Test H5*open */
@@ -12385,7 +12385,7 @@ external_link_strong(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
if (H5Gclose(gid2) < 0)
TEST_ERROR
@@ -13953,7 +13953,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group"))
+ if (HDstrcmp(objname, "/group") != 0)
TEST_ERROR
/* Create object in group */
@@ -13973,7 +13973,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group/new_group"))
+ if (HDstrcmp(objname, "/group/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -14164,7 +14164,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME))
+ if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR
/* Create object in group */
@@ -14184,7 +14184,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/rereg_target/new_group"))
+ if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -14273,9 +14273,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u
if (lcpl_id < 0)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14300,9 +14300,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14327,9 +14327,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14351,9 +14351,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14373,9 +14373,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14672,7 +14672,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Now use the same ud link to access group_b */
- strcpy(group_b_name, "group_b");
+ HDstrcpy(group_b_name, "group_b");
if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0)
TEST_ERROR
@@ -14986,7 +14986,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
H5E_END_TRY;
/* Create a user-defined link to the group. */
- strcpy(group_name, "/group");
+ HDstrcpy(group_name, "/group");
if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1,
H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
@@ -15207,7 +15207,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft17"))
+ if (HDstrcmp(objname, "/soft17") != 0)
TEST_ERROR
/* Create group using soft link */
@@ -15251,7 +15251,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft4"))
+ if (HDstrcmp(objname, "/soft4") != 0)
TEST_ERROR
/* Test other functions that should use a LAPL */
@@ -15711,7 +15711,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data;
/* Check for correct link information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name))
+ if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != linfo->type)
return (H5_ITER_ERROR);
@@ -15902,7 +15902,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data;
/* Check for correct object information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name))
+ if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != oinfo->type)
return (H5_ITER_ERROR);
@@ -16431,13 +16431,13 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
@@ -16448,7 +16448,7 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
@@ -17896,7 +17896,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17905,7 +17905,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order if there is no creation order index, since
@@ -17935,7 +17935,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17944,7 +17944,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
} /* end if */
@@ -17969,7 +17969,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17978,7 +17978,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Verify the link information for first link, in increasing link name order */
@@ -18001,7 +18001,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -18010,7 +18010,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order queries on link name order, since there's not
@@ -18037,7 +18037,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -18046,7 +18046,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Success */
@@ -18403,7 +18403,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18411,7 +18411,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Verify link information (in native order - native is increasing) */
@@ -18428,7 +18428,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18436,7 +18436,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Make link name for decreasing order queries */
@@ -18459,7 +18459,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18467,7 +18467,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18691,7 +18691,7 @@ delete_by_idx(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18765,7 +18765,7 @@ delete_by_idx(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18844,7 +18844,7 @@ delete_by_idx(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18878,7 +18878,7 @@ delete_by_idx(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19059,7 +19059,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19138,7 +19138,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19176,7 +19176,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19262,7 +19262,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19777,7 +19777,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u",
(info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
diff --git a/test/links_env.c b/test/links_env.c
index 2d7a0fd..590be20 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -69,7 +69,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env"))
+ if (HDstrcmp(envval, ".:tmp_links_env") != 0)
TEST_ERROR
/* Set up name for main file:"extlinks_env0" */
@@ -115,7 +115,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
H5_FAILED();
- puts(" Should have found the file in tmp_links_env directory.");
+ HDputs(" Should have found the file in tmp_links_env directory.");
goto error;
}
diff --git a/test/mf.c b/test/mf.c
index 081fb77..9eb7807 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -168,22 +168,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
FAIL_STACK_ERROR
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space,
- state->tot_space);
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
@@ -225,7 +230,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -316,7 +321,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -373,7 +378,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -463,7 +468,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -513,7 +518,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != (file_size + TBLOCK_SIZE30))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -558,7 +563,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != (file_size + TBLOCK_SIZE30))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -606,7 +611,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -660,7 +665,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -748,7 +753,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -812,7 +817,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -867,7 +872,8 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("'temporary' file space allocation with old library format")
/* Can't run this test with multi-file VFDs */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t * f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -1021,7 +1027,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -1117,7 +1123,7 @@ test_mf_fs_start(hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -1269,7 +1275,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 2");
@@ -1345,7 +1351,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc()/H5MF_xfree() of free-space manager:test 3");
@@ -1434,7 +1440,7 @@ test_mf_fs_alloc_free(hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -1631,7 +1637,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 2");
@@ -1736,7 +1742,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 3");
@@ -1841,7 +1847,7 @@ test_mf_fs_extend(hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_try_extend() of free-space manager:test 4");
@@ -1955,7 +1961,7 @@ test_mf_fs_extend(hid_t fapl)
if (H5Pclose(fapl_new) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -2011,7 +2017,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("A free-space section absorbs an aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2072,7 +2078,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2134,7 +2140,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2187,7 +2193,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2278,7 +2284,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fcpl) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2338,7 +2344,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 2");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2422,7 +2428,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2496,7 +2502,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator: test 3");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2588,7 +2594,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2664,7 +2670,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 4");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2756,7 +2762,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2813,7 +2819,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 5");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2882,7 +2888,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -2951,7 +2957,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 6");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3045,7 +3051,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3125,7 +3131,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 7");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3237,7 +3243,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3296,7 +3302,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3396,7 +3402,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3466,7 +3472,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3536,7 +3542,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3594,7 +3600,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3648,7 +3654,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3713,7 +3719,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3776,7 +3782,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (file_size != empty_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -3848,8 +3854,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3950,7 +3956,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != file_size)
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4007,7 +4013,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != (file_size - TBLOCK_SIZE50))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4067,7 +4073,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (new_file_size != (file_size + TBLOCK_SIZE30))
TEST_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4208,7 +4214,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc() of free-space manager with alignment: test 2");
@@ -4285,15 +4291,15 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
TESTING("H5MF_alloc() of free-space manager with alignment: test 3");
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
TEST_ERROR
@@ -4361,7 +4367,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4498,8 +4504,8 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4636,7 +4642,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -4760,8 +4766,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4929,7 +4935,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5105,8 +5111,8 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5314,7 +5320,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5418,8 +5424,8 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5529,7 +5535,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5636,8 +5642,8 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5758,7 +5764,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -5906,8 +5912,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -6072,7 +6078,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
} /* end if */
else {
SKIPPED();
@@ -6176,7 +6182,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
} /* end else */
/* Close memb_fapl */
@@ -6245,7 +6251,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
if ((addr2 - addr1) != (3 * align))
TEST_ERROR
- PASSED()
+ PASSED();
/* Close file */
if (H5Fclose(file) < 0)
@@ -6526,7 +6532,7 @@ test_mf_fs_persist_split(void)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -6883,7 +6889,7 @@ test_mf_fs_persist_multi(void)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -6923,7 +6929,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
else
TESTING("File's free-space is persistent with old library format")
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -7054,7 +7060,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -7100,7 +7106,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("File's free-space is going away with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -7243,7 +7249,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if (H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -7291,7 +7297,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
TESTING("File space strategy/persisting/threshold with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7417,7 +7423,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if (H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -7461,7 +7467,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TESTING("File space merge/shrink for section size < threshold with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7606,7 +7612,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if (H5Pclose(fapl2) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -7699,7 +7705,7 @@ test_dichotomy(hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
return (0);
@@ -7755,7 +7761,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
return 0;
@@ -7894,6 +7900,8 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
if (fs_persist) {
+ haddr_t prv_tag = HADDR_UNDEF;
+
/* Re-open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 0)
TEST_ERROR
@@ -7902,6 +7910,9 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
TEST_ERROR
+ /* Set the freespace tag for the metadata cache */
+ H5AC_tag(H5AC__FREESPACE_TAG, &prv_tag);
+
/* Verify that the large generic manager is there */
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
if (!H5F_addr_defined(f->shared->fs_addr[fs_type]))
@@ -7957,6 +7968,9 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if (found_addr != gaddr1)
TEST_ERROR
+ /* Reset the previous tag */
+ H5AC_tag(prv_tag, NULL);
+
/* Close file */
if (H5Fclose(fid) < 0)
TEST_ERROR
@@ -7966,7 +7980,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fapl_new) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8018,7 +8032,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_shrink()");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8098,7 +8112,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8147,8 +8161,8 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a small block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
if (contig_addr_vfd) {
@@ -8278,7 +8292,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8326,7 +8340,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a large block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8441,7 +8455,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8490,7 +8504,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: large allocations and de-allocations");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8597,7 +8611,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
if (file_size % TBLOCK_SIZE4096)
TEST_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8768,7 +8782,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fcpl) < 0)
FAIL_STACK_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
@@ -8906,7 +8920,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
/* Close memb_fapl */
if (H5Pclose(memb_fapl) < 0)
@@ -9082,7 +9096,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
if (H5Pclose(fapl_new) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
}
else {
SKIPPED();
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
new file mode 100644
index 0000000..3556cd2
--- /dev/null
+++ b/test/mirror_vfd.c
@@ -0,0 +1,2640 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test the Mirror VFD functionality.
+ */
+
+/* WARNING: The use of realpath() is probably system-dependent, as are
+ * other things here such as the socket calls.
+ * Notable to realpath() in particular is the use of "PATH_MAX", which
+ * apparently has some major potential issues if paths are abused.
+ * http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
+ * so BE CAREFUL about the paths we throw around?
+ */
+
+#include "h5test.h"
+#include "cache_common.h"
+#include "genall5.h"
+
+#ifdef H5_HAVE_MIRROR_VFD
+
+#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */
+
+/* For future consideration, IP address and port number might be
+ * environment variables?
+ */
+#define SERVER_IP_ADDRESS "127.0.0.1"
+
+/* Primary listening port on server. */
+#define SERVER_HANDSHAKE_PORT 3000
+
+#define DATABUFFER_SIZE 128
+#define DSET_NAME_LEN 16
+
+/* Parameters for the "large chunked dataset" writing */
+#define MAX_DSET_COUNT 255
+#define DSET_DIM 32
+#define CHUNK_DIM 8
+
+#define CONCURRENT_COUNT 3 /* Number of files in concurrent test */
+
+/* Macro: LOGPRINT()
+ * Prints logging and debugging messages to the output stream based
+ * on the level of verbosity.
+ * 0 : no logging
+ * 1 : errors only
+ * 2 : details
+ * 3 : all
+ */
+#define DEFAULT_VERBOSITY 1
+static unsigned int g_verbosity = DEFAULT_VERBOSITY;
+
+/* Macro for selective debug printing / logging */
+#define LOGPRINT(lvl, ...) \
+ do { \
+ if ((lvl) <= g_verbosity) { \
+ HDfprintf(g_log_stream, __VA_ARGS__); \
+ HDfflush(g_log_stream); \
+ } \
+ } while (0)
+
+#define MIRROR_RW_DIR "mirror_rw/"
+#define MIRROR_WO_DIR "mirror_wo/"
+
+/* String buffer for error messages */
+#define MIRR_MESG_SIZE 128
+static char mesg[MIRR_MESG_SIZE + 1];
+
+/* Convenience structure for passing file names via helper functions.
+ */
+struct mirrortest_filenames {
+ char rw[H5FD_SPLITTER_PATH_MAX + 1];
+ char wo[H5FD_SPLITTER_PATH_MAX + 1];
+ char log[H5FD_SPLITTER_PATH_MAX + 1];
+};
+
+static FILE *g_log_stream = NULL; /* initialized at runtime */
+
+static herr_t _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_id, hid_t *dataset_id,
+ hid_t memspace_id);
+
+static herr_t _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t *chunk_dims,
+ hsize_t *dset_dims, hid_t *dataspace_ids, hid_t *filespace_ids,
+ hid_t *dataset_ids, hid_t *memspace_id);
+
+static herr_t _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *dataspace_ids,
+ hid_t *filespace_ids, hid_t *dataset_ids, hid_t *memspace_id);
+
+static herr_t _populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, char *path_out,
+ hbool_t h5suffix);
+
+static hid_t create_mirroring_split_fapl(const char *_basename, struct mirrortest_filenames *names);
+
+static void mybzero(void *dest, size_t size);
+
+/* ----------------------------------------------------------------------------
+ * Function: mybzero
+ *
+ * Purpose: Have bzero simplicity and abstraction in (possible) absence of
+ * it being available.
+ *
+ * Programmer: Jacob Smith
+ * 2020-03-30
+ * ----------------------------------------------------------------------------
+ */
+static void
+mybzero(void *dest, size_t size)
+{
+ size_t i = 0;
+ char * s = NULL;
+ HDassert(dest != NULL);
+ s = (char *)dest;
+ for (i = 0; i < size; i++) {
+ *(s + i) = 0;
+ }
+} /* end mybzero() */
+
+/* ----------------------------------------------------------------------------
+ * Function: _populate_filepath
+ *
+ * Purpose: Given a directory name and a base name, concatenate the two and
+ * run h5fixname() to get the "actual" path to the intented target.
+ * `h5suffix' should be FALSE to keep the base name unaltered;
+ * TRUE will append the '.h5' h5suffix to the basename...
+ * FALSE -> h5fixname_no_suffix(), TRUE -> h5fixname()
+ * <h5fixname_prefix> / <dirname> / <_basename> <h5prefix?>
+ *
+ * Programmer: Jacob Smith
+ * 2019-08-16
+ * ----------------------------------------------------------------------------
+ */
+static herr_t
+_populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, char *path_out,
+ hbool_t h5suffix)
+{
+ char _path[H5FD_SPLITTER_PATH_MAX];
+
+ if ((_basename == NULL) || (*_basename == 0) || (dirname == NULL) || (*dirname == 0) ||
+ (path_out == NULL)) {
+ TEST_ERROR;
+ }
+
+ if (HDsnprintf(_path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
+ (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
+ _basename) > H5FD_SPLITTER_PATH_MAX) {
+ TEST_ERROR;
+ }
+
+ if (h5suffix == TRUE) {
+ if (h5_fixname(_path, fapl_id, path_out, H5FD_SPLITTER_PATH_MAX) == NULL) {
+ TEST_ERROR;
+ }
+ }
+ else {
+ if (h5_fixname_no_suffix(_path, fapl_id, path_out, H5FD_SPLITTER_PATH_MAX) == NULL) {
+ TEST_ERROR;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+} /* end _populate_filepath() */
+
+/* ---------------------------------------------------------------------------
+ * Function: build_paths
+ *
+ * Purpose: Convenience function to create the three file paths used in
+ * most mirror tests.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019-08-16
+ * ---------------------------------------------------------------------------
+ */
+static herr_t
+build_paths(const char *_basename, H5FD_splitter_vfd_config_t *splitter_config,
+ struct mirrortest_filenames *names)
+{
+ char baselogname[H5FD_SPLITTER_PATH_MAX];
+
+ if (_populate_filepath(MIRROR_RW_DIR, _basename, splitter_config->rw_fapl_id, names->rw, TRUE) == FAIL) {
+ TEST_ERROR;
+ }
+
+ if (_populate_filepath(MIRROR_WO_DIR, _basename, splitter_config->wo_fapl_id, names->wo, TRUE) == FAIL) {
+ TEST_ERROR;
+ }
+
+ if (_basename == NULL || *_basename == 0)
+ return FAIL;
+ if (HDsnprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", _basename) > H5FD_SPLITTER_PATH_MAX) {
+ TEST_ERROR;
+ }
+
+ if (_populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, FALSE) ==
+ FAIL) {
+ TEST_ERROR;
+ }
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+} /* end build_paths() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_fapl_configuration
+ *
+ * Purpose: Test FAPL configuration and examination.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019-03-12
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_fapl_configuration(void)
+{
+ hid_t fapl_id;
+ H5FD_mirror_fapl_t mirror_conf = {
+ H5FD_MIRROR_FAPL_MAGIC, /* magic */
+ H5FD_MIRROR_CURR_FAPL_T_VERSION, /* version */
+ SERVER_HANDSHAKE_PORT, /* handhake_port */
+ SERVER_IP_ADDRESS, /* remote_ip "IP address" */
+ };
+ H5FD_mirror_fapl_t fa_out = {0, 0, 0, ""};
+
+ TESTING("Mirror fapl configuration (set/get)");
+
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ if (H5Pset_fapl_mirror(fapl_id, &mirror_conf) == FAIL) {
+ TEST_ERROR;
+ }
+
+ if (H5Pget_fapl_mirror(fapl_id, &fa_out) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5FD_MIRROR_FAPL_MAGIC != fa_out.magic) {
+ TEST_ERROR;
+ }
+ if (H5FD_MIRROR_CURR_FAPL_T_VERSION != fa_out.version) {
+ TEST_ERROR;
+ }
+ if (SERVER_HANDSHAKE_PORT != fa_out.handshake_port) {
+ TEST_ERROR;
+ }
+ if (HDstrncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN)) {
+ TEST_ERROR;
+ }
+
+ if (H5Pclose(fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ if (H5I_INVALID_HID != fapl_id) {
+ (void)H5Pclose(fapl_id);
+ }
+ return -1;
+} /* end test_fapl_configuration() */
+
+#define PRINT_BUFFER_DIFF(act, exp, len) \
+ do { \
+ size_t _x = 0; \
+ while ((act)[_x] == (exp)[_x]) { \
+ _x++; \
+ } \
+ if (_x != (len)) { \
+ size_t _y = 0; \
+ HDprintf("First bytes differ at %zu\n", _x); \
+ HDprintf("exp "); \
+ for (_y = _x; _y < (len); _y++) { \
+ HDprintf("%02X", (unsigned char)(exp)[_y]); \
+ } \
+ HDprintf("\nact "); \
+ for (_y = _x; _y < (len); _y++) { \
+ HDprintf("%02X", (unsigned char)(act)[_y]); \
+ } \
+ HDprintf("\n"); \
+ } \
+ } while (0); /* end PRINT_BUFFER_DIFF */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_xmit_encode_decode
+ *
+ * Purpose: Test byte-encoding operations for network transport.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2020-02-02
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_xmit_encode_decode(void)
+{
+ H5FD_mirror_xmit_t xmit_mock; /* re-used header in various xmit tests */
+
+ TESTING("Mirror encode/decode of xmit elements");
+
+ /* Set bogus values matching expected; encoding doesn't care
+ * Use sequential values to easily generate the expected buffer with a
+ * for loop.
+ */
+ xmit_mock.magic = 0x00010203;
+ xmit_mock.version = 0x04;
+ xmit_mock.session_token = 0x05060708;
+ xmit_mock.xmit_count = 0x090A0B0C;
+ xmit_mock.op = 0x0D;
+
+ /* Test uint8_t encode/decode
+ */
+ do {
+ unsigned char buf[8];
+ unsigned char expected[8];
+ const uint8_t v = 200;
+ unsigned char out = 0;
+
+ /* Start of buffer uint8_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[0] = 200;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint8(buf, v) != 1) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint8(&out, buf) != 1) {
+ TEST_ERROR;
+ }
+ if (v != out) {
+ TEST_ERROR;
+ }
+
+ /* Middle of buffer uint8_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[3] = v;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint8((buf + 3), v) != 1) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint8(&out, (buf + 3)) != 1) {
+ TEST_ERROR;
+ }
+ if (v != out) {
+ TEST_ERROR;
+ }
+
+ /* End of buffer uint8_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[7] = v;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint8((buf + 7), v) != 1) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint8(&out, (buf + 7)) != 1) {
+ TEST_ERROR;
+ }
+ if (v != out) {
+ TEST_ERROR;
+ }
+
+ } while (0); /* end uint8_t en/decode */
+
+ /* Test uint16_t encode/decode
+ */
+ do {
+ unsigned char buf[8];
+ unsigned char expected[8];
+ const uint16_t v = 0x8F02;
+ uint16_t out = 0;
+
+ /* Start of buffer uint16_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[0] = 0x8F;
+ expected[1] = 0x02;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint16(buf, v) != 2) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint16(&out, buf) != 2) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ /* Middle of buffer uint16_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[3] = 0x8F;
+ expected[4] = 0x02;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint16((buf + 3), v) != 2) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint16(&out, (buf + 3)) != 2) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+ /* slice */
+ if (H5FD__mirror_xmit_decode_uint16(&out, (buf + 4)) != 2) {
+ TEST_ERROR;
+ }
+ if (out != 0x0200) {
+ TEST_ERROR;
+ }
+
+ /* End of buffer uint16_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[6] = 0x8F;
+ expected[7] = 0x02;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint16((buf + 6), v) != 2) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint16(&out, (buf + 6)) != 2) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ } while (0); /* end uint16_t en/decode */
+
+ /* Test uint32_t encode/decode
+ */
+ do {
+ unsigned char buf[8];
+ unsigned char expected[8];
+ const uint32_t v = 0x8F020048;
+ uint32_t out = 0;
+
+ /* Start of buffer uint32_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[0] = 0x8F;
+ expected[1] = 0x02;
+ expected[2] = 0x00;
+ expected[3] = 0x48;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint32(buf, v) != 4) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint32(&out, buf) != 4) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ /* Middle of buffer uint32_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[3] = 0x8F;
+ expected[4] = 0x02;
+ expected[5] = 0x00;
+ expected[6] = 0x48;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint32((buf + 3), v) != 4) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint32(&out, (buf + 3)) != 4) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+ /* slice */
+ if (H5FD__mirror_xmit_decode_uint32(&out, (buf + 4)) != 4) {
+ TEST_ERROR;
+ }
+ if (out != 0x02004800) {
+ TEST_ERROR;
+ }
+
+ /* End of buffer uint32_t
+ */
+ mybzero(buf, 8);
+ mybzero(expected, 8);
+ expected[4] = 0x8F;
+ expected[5] = 0x02;
+ expected[6] = 0x00;
+ expected[7] = 0x48;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint32((buf + 4), v) != 4) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 8);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint32(&out, (buf + 4)) != 4) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ } while (0); /* end uint32_t en/decode */
+
+ /* Test uint64_t encode/decode
+ */
+ do {
+ unsigned char buf[16];
+ unsigned char expected[16];
+ const uint64_t v = 0x90DCBE17939CE4BB;
+ uint64_t out = 0;
+
+ /* Start of buffer uint64_t
+ */
+ mybzero(buf, 16);
+ mybzero(expected, 16);
+ expected[0] = 0x90;
+ expected[1] = 0xDC;
+ expected[2] = 0xBE;
+ expected[3] = 0x17;
+ expected[4] = 0x93;
+ expected[5] = 0x9C;
+ expected[6] = 0xE4;
+ expected[7] = 0xBB;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint64(buf, v) != 8) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 16) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 16);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint64(&out, buf) != 8) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ /* Middle of buffer uint64_t
+ */
+ mybzero(buf, 16);
+ mybzero(expected, 16);
+ expected[3] = 0x90;
+ expected[4] = 0xDC;
+ expected[5] = 0xBE;
+ expected[6] = 0x17;
+ expected[7] = 0x93;
+ expected[8] = 0x9C;
+ expected[9] = 0xE4;
+ expected[10] = 0xBB;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint64((buf + 3), v) != 8) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 16) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 16);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint64(&out, (buf + 3)) != 8) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+ /* slice */
+ if (H5FD__mirror_xmit_decode_uint64(&out, (buf + 6)) != 8) {
+ TEST_ERROR;
+ }
+ if (out != 0x17939CE4BB000000) {
+ TEST_ERROR;
+ }
+
+ /* End of buffer uint64_t
+ */
+ mybzero(buf, 16);
+ mybzero(expected, 16);
+ expected[8] = 0x90;
+ expected[9] = 0xDC;
+ expected[10] = 0xBE;
+ expected[11] = 0x17;
+ expected[12] = 0x93;
+ expected[13] = 0x9C;
+ expected[14] = 0xE4;
+ expected[15] = 0xBB;
+ out = 0;
+ if (H5FD__mirror_xmit_encode_uint64((buf + 8), v) != 8) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, 16) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, 16);
+ TEST_ERROR;
+ }
+ if (H5FD__mirror_xmit_decode_uint64(&out, (buf + 8)) != 8) {
+ TEST_ERROR;
+ }
+ if (out != v) {
+ TEST_ERROR;
+ }
+
+ } while (0); /* end uint64_t en/decode */
+
+ /* Test xmit header structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_HEADER_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_HEADER_SIZE + 8];
+ H5FD_mirror_xmit_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if (14 != H5FD_MIRROR_XMIT_HEADER_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_HEADER_SIZE; i++) {
+ expected[i + 2] = (unsigned char)i;
+ }
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_header((buf + 2), &xmit_mock) != H5FD_MIRROR_XMIT_HEADER_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_HEADER_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_header(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_HEADER_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.op != xmit_mock.op)
+ TEST_ERROR;
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_header(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_HEADER_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.op != 0x0B)
+ TEST_ERROR;
+
+ } while (0); /* end xmit header en/decode */
+
+ /* Test xmit set-eoa structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_EOA_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_EOA_SIZE + 8];
+ H5FD_mirror_xmit_eoa_t xmit_in;
+ H5FD_mirror_xmit_eoa_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if ((14 + 9) != H5FD_MIRROR_XMIT_EOA_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+ if (xmit_mock.op != 0x0D) {
+ FAIL_PUTS_ERROR("shared header structure is not in expected state");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_EOA_SIZE; i++) {
+ expected[i + 2] = (unsigned char)i;
+ }
+
+ /* Set xmit_in
+ */
+ xmit_in.pub = xmit_mock; /* shared/common */
+ xmit_in.type = 0x0E;
+ xmit_in.eoa_addr = 0x0F10111213141516;
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_set_eoa((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_EOA_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_EOA_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_set_eoa(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_EOA_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.pub.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.pub.op != xmit_mock.op)
+ TEST_ERROR;
+ if (xmit_out.type != 0x0E)
+ TEST_ERROR;
+ if (xmit_out.eoa_addr != 0x0F10111213141516)
+ TEST_ERROR;
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_set_eoa(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_EOA_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.pub.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.pub.op != 0x0B)
+ TEST_ERROR;
+ if (xmit_out.type != 0x0C)
+ TEST_ERROR;
+ if (xmit_out.eoa_addr != 0x0D0E0F1011121314)
+ TEST_ERROR;
+
+ } while (0); /* end xmit set-eoa en/decode */
+
+ /* Test xmit lock structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_LOCK_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_LOCK_SIZE + 8];
+ H5FD_mirror_xmit_lock_t xmit_in;
+ H5FD_mirror_xmit_lock_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if ((14 + 8) != H5FD_MIRROR_XMIT_LOCK_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+ if (xmit_mock.op != 0x0D) {
+ FAIL_PUTS_ERROR("shared header structure is not in expected state");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_LOCK_SIZE; i++) {
+ expected[i + 2] = (unsigned char)i;
+ }
+
+ /* Set xmit_in
+ */
+ xmit_in.pub = xmit_mock; /* shared/common */
+ xmit_in.rw = 0x0E0F101112131415;
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_lock((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_LOCK_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_LOCK_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_lock(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_LOCK_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.pub.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.pub.op != xmit_mock.op)
+ TEST_ERROR;
+ if (xmit_out.rw != 0x0E0F101112131415)
+ TEST_ERROR;
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_lock(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_LOCK_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.pub.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.pub.op != 0x0B)
+ TEST_ERROR;
+ if (xmit_out.rw != 0x0C0D0E0F10111213)
+ TEST_ERROR;
+
+ } while (0); /* end xmit lock en/decode */
+
+ /* Test xmit open structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ *
+ * Verifies that the first zero character in the filepath will end the
+ * string, with all following bytes in the encoded buffer being zeroed.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_OPEN_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_OPEN_SIZE + 8];
+ H5FD_mirror_xmit_open_t xmit_in;
+ H5FD_mirror_xmit_open_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if ((14 + 20 + 4097) != H5FD_MIRROR_XMIT_OPEN_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+ if (xmit_mock.op != 0x0D) {
+ FAIL_PUTS_ERROR("shared header structure is not in expected state");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_OPEN_SIZE; i++) {
+ /* 0x100 is "zero" in a byte, so encode will treat it as a NULL-
+ * terminator in the filepath string. Expect all zeroes following.
+ */
+ expected[i + 2] = (i > 0xFF) ? 0 : (unsigned char)i;
+ }
+
+ /* Set xmit_in
+ */
+ xmit_in.pub = xmit_mock; /* shared/common */
+ xmit_in.flags = 0x0E0F1011;
+ xmit_in.maxaddr = 0x1213141516171819;
+ xmit_in.size_t_blob = 0x1A1B1C1D1E1F2021;
+ for (i = 0x22; i < H5FD_MIRROR_XMIT_FILEPATH_MAX + 0x22; i++) {
+ /* nonzero values repeat after 0x100, but will not be encoded */
+ xmit_in.filename[i - 0x22] = (char)(i % 0x100);
+ }
+ xmit_in.filename[H5FD_MIRROR_XMIT_FILEPATH_MAX - 1] = 0;
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_open((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_OPEN_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_OPEN_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_open(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_OPEN_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.pub.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.pub.op != xmit_mock.op)
+ TEST_ERROR;
+ if (xmit_out.flags != xmit_in.flags)
+ TEST_ERROR;
+ if (xmit_out.maxaddr != xmit_in.maxaddr)
+ TEST_ERROR;
+ if (xmit_out.size_t_blob != xmit_in.size_t_blob)
+ TEST_ERROR;
+ if (HDstrncmp(xmit_out.filename, xmit_in.filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ PRINT_BUFFER_DIFF(xmit_out.filename, xmit_in.filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
+ TEST_ERROR;
+ }
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_open(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_OPEN_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.pub.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.pub.op != 0x0B)
+ TEST_ERROR;
+ if (xmit_out.flags != 0x0C0D0E0F)
+ TEST_ERROR;
+ if (xmit_out.maxaddr != 0x1011121314151617)
+ TEST_ERROR;
+ if (xmit_out.size_t_blob != 0x18191A1B1C1D1E1F)
+ TEST_ERROR;
+ /* update expected "filepath" in structure */
+ for (i = 0x20; i < H5FD_MIRROR_XMIT_FILEPATH_MAX + 0x20; i++) {
+ xmit_in.filename[i - 0x20] = (i > 0xFF) ? 0 : (char)i;
+ }
+ if (HDstrncmp(xmit_out.filename, xmit_in.filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ PRINT_BUFFER_DIFF(xmit_out.filename, xmit_in.filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
+ TEST_ERROR;
+ }
+
+ } while (0); /* end xmit open en/decode */
+
+ /* Test xmit reply structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ *
+ * Verifies that the first zero character in the filepath will end the
+ * string, with all following bytes in the encoded buffer being zeroed.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_REPLY_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_REPLY_SIZE + 8];
+ H5FD_mirror_xmit_reply_t xmit_in;
+ H5FD_mirror_xmit_reply_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if ((14 + 4 + 256) != H5FD_MIRROR_XMIT_REPLY_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+ if (xmit_mock.op != 0x0D) {
+ FAIL_PUTS_ERROR("shared header structure is not in expected state");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_REPLY_SIZE; i++) {
+ /* 0x100 is "zero" in a byte, so encode will treat it as a NULL-
+ * terminator in the filepath string. Expect all zeroes following.
+ */
+ expected[i + 2] = (i > 0xFF) ? 0 : (unsigned char)i;
+ }
+
+ /* Set xmit_in
+ */
+ xmit_in.pub = xmit_mock; /* shared/common */
+ xmit_in.status = 0x0E0F1011;
+ for (i = 0x12; i < H5FD_MIRROR_STATUS_MESSAGE_MAX + 0x12; i++) {
+ /* nonzero values repeat after 0x100, but will not be encoded */
+ xmit_in.message[i - 0x12] = (char)(i % 0x100);
+ }
+ xmit_in.message[H5FD_MIRROR_STATUS_MESSAGE_MAX - 1] = 0;
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_reply((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_REPLY_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_REPLY_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_reply(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_REPLY_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.pub.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.pub.op != xmit_mock.op)
+ TEST_ERROR;
+ if (xmit_out.status != xmit_in.status)
+ TEST_ERROR;
+ if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
+ TEST_ERROR;
+ }
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_reply(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_REPLY_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.pub.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.pub.op != 0x0B)
+ TEST_ERROR;
+ if (xmit_out.status != 0x0C0D0E0F)
+ TEST_ERROR;
+ /* update expected "message" in structure */
+ for (i = 0x10; i < H5FD_MIRROR_STATUS_MESSAGE_MAX + 0x10; i++) {
+ xmit_in.message[i - 0x10] = (i > 0xFF) ? 0 : (char)i;
+ }
+ if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
+ TEST_ERROR;
+ }
+
+ } while (0); /* end xmit reply en/decode */
+
+ /* Test xmit write structure encode/decode
+ * Write bogus but easily verifiable data to inside a buffer, and compare.
+ * Then decode the buffer and compare the structure contents.
+ * Then repeat from a different offset in the buffer and compare.
+ */
+ do {
+ unsigned char buf[H5FD_MIRROR_XMIT_WRITE_SIZE + 8];
+ unsigned char expected[H5FD_MIRROR_XMIT_WRITE_SIZE + 8];
+ H5FD_mirror_xmit_write_t xmit_in;
+ H5FD_mirror_xmit_write_t xmit_out;
+ size_t i = 0;
+
+ /* sanity check */
+ if ((14 + 17) != H5FD_MIRROR_XMIT_WRITE_SIZE) {
+ FAIL_PUTS_ERROR("Header size definition does not match test\n");
+ }
+ if (xmit_mock.op != 0x0D) {
+ FAIL_PUTS_ERROR("shared header structure is not in expected state");
+ }
+
+ /* Populate the expected buffer; expect end padding of 0xFF
+ */
+ HDmemset(expected, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
+ for (i = 0; i < H5FD_MIRROR_XMIT_WRITE_SIZE; i++) {
+ expected[i + 2] = (unsigned char)i;
+ }
+
+ /* Set xmit_in
+ */
+ xmit_in.pub = xmit_mock; /* shared/common */
+ xmit_in.type = 0x0E;
+ xmit_in.offset = 0x0F10111213141516;
+ xmit_in.size = 0x1718191A1B1C1D1E;
+
+ /* Encode, and compare buffer contents
+ * Initial buffer is filled with 0xFF to match expected padding
+ */
+ HDmemset(buf, 0xFF, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
+ if (H5FD_mirror_xmit_encode_write((buf + 2), &xmit_in) != H5FD_MIRROR_XMIT_WRITE_SIZE) {
+ TEST_ERROR;
+ }
+ if (HDmemcmp(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8) != 0) {
+ PRINT_BUFFER_DIFF(buf, expected, H5FD_MIRROR_XMIT_WRITE_SIZE + 8);
+ TEST_ERROR;
+ }
+
+ /* Decode from buffer
+ */
+ if (H5FD_mirror_xmit_decode_write(&xmit_out, (buf + 2)) != H5FD_MIRROR_XMIT_WRITE_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != xmit_mock.magic)
+ TEST_ERROR;
+ if (xmit_out.pub.version != xmit_mock.version)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != xmit_mock.session_token)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != xmit_mock.xmit_count)
+ TEST_ERROR;
+ if (xmit_out.pub.op != xmit_mock.op)
+ TEST_ERROR;
+ if (xmit_out.type != 0x0E)
+ TEST_ERROR;
+ if (xmit_out.offset != 0x0F10111213141516)
+ TEST_ERROR;
+ if (xmit_out.size != 0x1718191A1B1C1D1E)
+ TEST_ERROR;
+
+ /* Decode from different offset in buffer
+ * Observe changes when ingesting the padding
+ */
+ if (H5FD_mirror_xmit_decode_write(&xmit_out, (buf)) != H5FD_MIRROR_XMIT_WRITE_SIZE) {
+ TEST_ERROR;
+ }
+ if (xmit_out.pub.magic != 0xFFFF0001)
+ TEST_ERROR;
+ if (xmit_out.pub.version != 0x02)
+ TEST_ERROR;
+ if (xmit_out.pub.session_token != 0x03040506)
+ TEST_ERROR;
+ if (xmit_out.pub.xmit_count != 0x0708090A)
+ TEST_ERROR;
+ if (xmit_out.pub.op != 0x0B)
+ TEST_ERROR;
+ if (xmit_out.type != 0x0C)
+ TEST_ERROR;
+ if (xmit_out.offset != 0x0D0E0F1011121314)
+ TEST_ERROR;
+ if (xmit_out.size != 0x15161718191A1B1C)
+ TEST_ERROR;
+
+ } while (0); /* end xmit write en/decode */
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+} /* end test_xmit_encode_decode */
+
+/* ---------------------------------------------------------------------------
+ * Function: create_mirroring_split_fapl
+ *
+ * Purpose: Create and populate a mirroring FAPL ID.
+ * Creates target files with the given base name -- ideally the
+ * test name -- and creates mirroring/split FAPL set to use the
+ * global mirroring info and a sec2 R/W channel driver.
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: HID of the top-level (splitter) FAPL, a non-negative
+ * value.
+ * Failure: H5I_INVALID_HID, a negative value.
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static hid_t
+create_mirroring_split_fapl(const char *_basename, struct mirrortest_filenames *names)
+{
+ H5FD_splitter_vfd_config_t splitter_config;
+ H5FD_mirror_fapl_t mirror_conf;
+ hid_t ret_value = H5I_INVALID_HID;
+
+ if (_basename == NULL || *_basename == '\0') {
+ TEST_ERROR;
+ }
+
+ splitter_config.magic = H5FD_SPLITTER_MAGIC;
+ splitter_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ splitter_config.ignore_wo_errs = FALSE;
+
+ /* Create Splitter R/W channel driver (sec2)
+ */
+ splitter_config.rw_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5I_INVALID_HID == splitter_config.rw_fapl_id) {
+ TEST_ERROR;
+ }
+ if (H5Pset_fapl_sec2(splitter_config.rw_fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* Create Splitter W/O channel driver (mirror)
+ */
+ mirror_conf.magic = H5FD_MIRROR_FAPL_MAGIC;
+ mirror_conf.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
+ mirror_conf.handshake_port = SERVER_HANDSHAKE_PORT;
+ if (HDstrncpy(mirror_conf.remote_ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN) == NULL) {
+ TEST_ERROR;
+ }
+ splitter_config.wo_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5I_INVALID_HID == splitter_config.wo_fapl_id) {
+ TEST_ERROR;
+ }
+ if (H5Pset_fapl_mirror(splitter_config.wo_fapl_id, &mirror_conf) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* Build r/w, w/o, and log file paths
+ */
+ if (build_paths(_basename, &splitter_config, names) < 0) {
+ TEST_ERROR;
+ }
+
+ /* Set file paths for w/o and logfile
+ */
+ if (HDstrncpy(splitter_config.wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL) {
+ TEST_ERROR;
+ }
+ if (HDstrncpy(splitter_config.log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL) {
+ TEST_ERROR;
+ }
+
+ /* Create Splitter FAPL
+ */
+ ret_value = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5I_INVALID_HID == ret_value) {
+ TEST_ERROR;
+ }
+ if (H5Pset_fapl_splitter(ret_value, &splitter_config) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* Close FAPLs created for child channels
+ */
+ if (H5Pclose(splitter_config.rw_fapl_id) < 0) {
+ TEST_ERROR;
+ }
+ splitter_config.rw_fapl_id = H5I_INVALID_HID;
+ if (H5Pclose(splitter_config.wo_fapl_id) < 0) {
+ TEST_ERROR;
+ }
+ splitter_config.wo_fapl_id = H5I_INVALID_HID;
+
+ return ret_value;
+
+error:
+ if (splitter_config.wo_fapl_id >= 0) {
+ (void)H5Pclose(splitter_config.wo_fapl_id);
+ }
+ if (splitter_config.rw_fapl_id >= 0) {
+ (void)H5Pclose(splitter_config.rw_fapl_id);
+ }
+ if (ret_value >= 0) {
+ (void)H5Pclose(ret_value);
+ }
+ return H5I_INVALID_HID;
+} /* end create_mirroring_split_fapl() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_create_and_close
+ *
+ * Purpose: Test/demonstrate a do-nothing file open and close.
+ *
+ * Verifying file existence and contents is part of other tests.
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019-12-17
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_create_and_close(void)
+{
+ struct mirrortest_filenames names;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5P_DEFAULT;
+
+ TESTING("File creation and immediate close");
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ fapl_id = create_mirroring_split_fapl("basic_create", &names);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Create and Close */
+
+ file_id = H5Fcreate(names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* Standard cleanup */
+
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (fapl_id != H5P_DEFAULT && fapl_id >= 0) {
+ if (H5Pclose(fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ (void)H5Fclose(file_id);
+ (void)H5Pclose(fapl_id);
+ }
+ H5E_END_TRY;
+ return -1;
+} /* end test_create_and_close() */
+
+/* ----------------------------------------------------------------------------
+ * Function: create_datasets
+ *
+ * Purpose: Given a file ID and least and greateset dataset indices, create
+ * populated chunked datasets in the target file from min_dset to
+ * (and including) max_dset.
+ * Uses #defined constants to determine chunk and dataset sizes
+ * and values.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019-08-14
+ * ----------------------------------------------------------------------------
+ */
+static herr_t
+create_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset)
+{
+ hid_t dataspace_ids[MAX_DSET_COUNT + 1];
+ hid_t dataset_ids[MAX_DSET_COUNT + 1];
+ hid_t filespace_ids[MAX_DSET_COUNT + 1];
+ int data_chunk[CHUNK_DIM][CHUNK_DIM];
+ unsigned int i, j, k, l, m;
+ hsize_t offset[2];
+ hid_t memspace_id = H5I_INVALID_HID;
+ hsize_t a_size[2] = {CHUNK_DIM, CHUNK_DIM};
+ hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM};
+ hsize_t dset_dims[2] = {DSET_DIM, DSET_DIM};
+
+ HDassert(file_id >= 0);
+ HDassert(min_dset <= max_dset);
+ HDassert(max_dset <= MAX_DSET_COUNT);
+
+ LOGPRINT(2, "create_dataset()\n");
+
+ /* ---------------------------------
+ * "Clear" ID arrays
+ */
+
+ for (i = 0; i < MAX_DSET_COUNT; i++) {
+ LOGPRINT(3, "clearing IDs [%d]\n", i);
+ dataspace_ids[i] = H5I_INVALID_HID;
+ dataset_ids[i] = H5I_INVALID_HID;
+ filespace_ids[i] = H5I_INVALID_HID;
+ }
+
+ /* ---------------------------------
+ * Generate dataspace, dataset, and 'filespace' IDs
+ */
+
+ if (_create_chunking_ids(file_id, min_dset, max_dset, chunk_dims, dset_dims, dataspace_ids, filespace_ids,
+ dataset_ids, &memspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* ---------------------------------
+ * Initialize (write) all datasets in a "round robin"...
+ * for a given chunk 'location', write chunk data to each dataset.
+ */
+
+ for (i = 0; i < DSET_DIM; i += CHUNK_DIM) {
+ LOGPRINT(3, "i: %d\n", i);
+ for (j = 0; j < DSET_DIM; j += CHUNK_DIM) {
+ LOGPRINT(3, " j: %d\n", j);
+ for (m = min_dset; m <= max_dset; m++) {
+ LOGPRINT(3, " m: %d\n", m);
+ for (k = 0; k < CHUNK_DIM; k++) {
+ for (l = 0; l < CHUNK_DIM; l++) {
+ data_chunk[k][l] = (int)((DSET_DIM * DSET_DIM * m) + (DSET_DIM * (i + k)) + j + l);
+ LOGPRINT(3, " data_chunk[%d][%d]: %d\n", k, l, data_chunk[k][l]);
+ }
+ }
+
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)i;
+ offset[1] = (hsize_t)j;
+ LOGPRINT(3, " H5Sselect_hyperslab()\n");
+ if (H5Sselect_hyperslab(filespace_ids[m], H5S_SELECT_SET, offset, NULL, a_size, NULL) < 0) {
+ TEST_ERROR;
+ }
+
+ LOGPRINT(3, " H5Dwrite()\n");
+ if (H5Dwrite(dataset_ids[m], H5T_NATIVE_INT, memspace_id, filespace_ids[m], H5P_DEFAULT,
+ data_chunk) < 0) {
+ TEST_ERROR;
+ }
+ }
+ }
+ }
+
+ /* ---------------------------------
+ * Read and verify data from datasets
+ */
+
+ if (_verify_datasets(min_dset, max_dset, filespace_ids, dataset_ids, memspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* ---------------------------------
+ * Cleanup
+ */
+
+ if (_close_chunking_ids(min_dset, max_dset, dataspace_ids, filespace_ids, dataset_ids, &memspace_id) ==
+ FAIL) {
+ TEST_ERROR;
+ }
+
+ return SUCCEED;
+
+error:
+ (void)_close_chunking_ids(min_dset, max_dset, dataspace_ids, filespace_ids, dataset_ids, &memspace_id);
+ LOGPRINT(1, "create_datasets() FAILED\n");
+ return FAIL;
+} /* end create_datasets() */
+
+/* ----------------------------------------------------------------------------
+ * Function: _create_chunking_ids
+ *
+ * Purpose: Create new IDs to be used with the associated file.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programer: Jacob Smith
+ * 2019
+ * ----------------------------------------------------------------------------
+ */
+static herr_t
+_create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t *chunk_dims,
+ hsize_t *dset_dims, hid_t *dataspace_ids, hid_t *filespace_ids, hid_t *dataset_ids,
+ hid_t *memspace_id)
+{
+ char dset_name[DSET_NAME_LEN + 1];
+ unsigned m = 0;
+ hid_t dcpl_id = H5I_INVALID_HID;
+
+ LOGPRINT(2, "_create_chunking_ids()\n");
+
+ /* --------------------
+ * Create chunking DCPL
+ */
+
+ dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
+ if (dcpl_id < 0) {
+ TEST_ERROR;
+ }
+ if (H5Pset_chunk(dcpl_id, 2, chunk_dims) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* --------------------
+ * Create dataspace IDs
+ */
+
+ for (m = min_dset; m <= max_dset; m++) {
+ dataspace_ids[m] = H5Screate_simple(2, dset_dims, NULL);
+ if (dataspace_ids[m] < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ /* --------------------
+ * Create dataset IDs
+ */
+
+ for (m = min_dset; m <= max_dset; m++) {
+ if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+
+ dataset_ids[m] =
+ H5Dcreate(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT, dcpl_id, H5P_DEFAULT);
+ if (dataset_ids[m] < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ /* --------------------
+ * Get file space IDs
+ */
+
+ for (m = min_dset; m <= max_dset; m++) {
+ filespace_ids[m] = H5Dget_space(dataset_ids[m]);
+ if (filespace_ids[m] < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ /* --------------------
+ * Create mem space to be used to read and write chunks
+ */
+
+ *memspace_id = H5Screate_simple(2, chunk_dims, NULL);
+ if (*memspace_id < 0) {
+ TEST_ERROR;
+ }
+
+ /* --------------------
+ * Clean up the DCPL, even if there were errors before
+ */
+
+ if (dcpl_id != H5P_DEFAULT && dcpl_id != H5I_INVALID_HID) {
+ if (H5Pclose(dcpl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ if (dcpl_id != H5P_DEFAULT && dcpl_id != H5I_INVALID_HID) {
+ (void)H5Pclose(dcpl_id);
+ }
+ LOGPRINT(1, "_create_chunking_ids() FAILED\n");
+ return FAIL;
+} /* end _create_chunking_ids() */
+
+/* ----------------------------------------------------------------------------
+ * Function: _open_chunking_ids
+ *
+ * Purpose: Open/access IDs from the given file.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ----------------------------------------------------------------------------
+ */
+static herr_t
+_open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t *chunk_dims,
+ hid_t *filespace_ids, hid_t *dataset_ids, hid_t *memspace_id)
+{
+ char dset_name[DSET_NAME_LEN + 1];
+ unsigned m = 0;
+
+ LOGPRINT(2, "_open_chunking_ids()\n");
+
+ /* --------------------
+ * Open dataset IDs
+ */
+
+ for (m = min_dset; m <= max_dset; m++) {
+ if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+
+ dataset_ids[m] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
+ if (dataset_ids[m] < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ /* --------------------
+ * Open filespace IDs
+ */
+
+ for (m = min_dset; m <= max_dset; m++) {
+ filespace_ids[m] = H5Dget_space(dataset_ids[m]);
+ if (filespace_ids[m] < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ /* --------------------
+ * Create mem space to be used to read and write chunks
+ */
+
+ *memspace_id = H5Screate_simple(2, chunk_dims, NULL);
+ if (*memspace_id < 0) {
+ TEST_ERROR;
+ }
+
+ return SUCCEED;
+
+error:
+ LOGPRINT(1, "_open_chunking_ids() FAILED\n");
+ return FAIL;
+} /* end _open_chunking_ids() */
+
+/* ---------------------------------------------------------------------------
+ * Function: _close_chunking_ids
+ *
+ * Purpose: Close IDs that were created or opened.
+ * Pass NULL into `dataspace_ids` when closing items opened with
+ * _open_chunking_ids(). (as opposed to created IDs)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static herr_t
+_close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *dataspace_ids, hid_t *filespace_ids,
+ hid_t *dataset_ids, hid_t *memspace_id)
+{
+ unsigned m;
+
+ LOGPRINT(2, "_close_chunking_ids()\n");
+
+ for (m = min_dset; m <= max_dset; m++) {
+ LOGPRINT(3, "closing ids[%d]\n", m);
+ if (dataspace_ids) {
+ if (H5Sclose(dataspace_ids[m]) < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+ if (H5Dclose(dataset_ids[m]) < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ if (H5Sclose(filespace_ids[m]) < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+
+ if ((*memspace_id != H5I_INVALID_HID) && (H5Sclose(*memspace_id) < 0)) {
+ TEST_ERROR;
+ }
+
+ return SUCCEED;
+
+error:
+ LOGPRINT(1, "_close_chunking_ids() FAILED\n");
+ return FAIL;
+} /* end _close_chunking_ids() */
+
+/* ---------------------------------------------------------------------------
+ * Function: _verify_datasets
+ *
+ * Purpose: Check that each chunk's contents are as expected, as pertaining
+ * to create_datasets().
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static herr_t
+_verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid_t *dataset_ids,
+ hid_t memspace_id)
+{
+ unsigned i, j, k, l, m;
+ int data_chunk[CHUNK_DIM][CHUNK_DIM];
+ hsize_t offset[2];
+ hsize_t a_size[2] = {CHUNK_DIM, CHUNK_DIM};
+
+ LOGPRINT(2, "_verify_datasets()\n");
+
+ for (i = 0; i < DSET_DIM; i += CHUNK_DIM) {
+ LOGPRINT(3, "i: %d\n", i);
+ for (j = 0; j < DSET_DIM; j += CHUNK_DIM) {
+ LOGPRINT(3, " j: %d\n", j);
+ for (m = min_dset; m <= max_dset; m++) {
+ LOGPRINT(3, " m: %d\n", m);
+
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)i;
+ offset[1] = (hsize_t)j;
+ if (H5Sselect_hyperslab(filespace_ids[m], H5S_SELECT_SET, offset, NULL, a_size, NULL) < 0) {
+ TEST_ERROR;
+ }
+
+ if (H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id, filespace_ids[m], H5P_DEFAULT,
+ data_chunk) < 0) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
+ FAIL_PUTS_ERROR(mesg);
+ }
+
+ for (k = 0; k < CHUNK_DIM; k++) {
+ for (l = 0; l < CHUNK_DIM; l++) {
+ if ((unsigned)data_chunk[k][l] !=
+ ((DSET_DIM * DSET_DIM * m) + (DSET_DIM * (i + k)) + j + l)) {
+ HDsnprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
+ k, l);
+ FAIL_PUTS_ERROR(mesg);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return SUCCEED;
+
+error:
+ LOGPRINT(1, "_verify_datasets() FAILED\n");
+ return FAIL;
+} /* end _verify_datasets() */
+
+/* ---------------------------------------------------------------------------
+ * Function: verify_datasets
+ *
+ * Purpose: Inspect the datasets in the file created by create_datasets().
+ * Wrapper for _verify_datasets() -- this function sets up and
+ * tears down accessor information.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static herr_t
+verify_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset)
+{
+ hid_t dataset_ids[MAX_DSET_COUNT + 1];
+ hid_t filespace_ids[MAX_DSET_COUNT + 1];
+ unsigned i;
+ hid_t memspace_id = H5I_INVALID_HID;
+ hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM};
+
+ HDassert(file_id >= 0);
+ HDassert(min_dset <= max_dset);
+ HDassert(max_dset <= MAX_DSET_COUNT);
+
+ LOGPRINT(2, "verify_datasets()\n");
+
+ /* ---------------------------------
+ * "Clear" ID arrays
+ */
+
+ for (i = 0; i < MAX_DSET_COUNT; i++) {
+ LOGPRINT(3, "clearing IDs [%d]\n", i);
+ dataset_ids[i] = H5I_INVALID_HID;
+ filespace_ids[i] = H5I_INVALID_HID;
+ }
+
+ /* ---------------------------------
+ * Generate dataspace, dataset, and 'filespace' IDs
+ */
+
+ if (_open_chunking_ids(file_id, min_dset, max_dset, chunk_dims, filespace_ids, dataset_ids,
+ &memspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* ---------------------------------
+ * Read and verify data from datasets
+ */
+
+ if (_verify_datasets(min_dset, max_dset, filespace_ids, dataset_ids, memspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* ---------------------------------
+ * Cleanup
+ */
+
+ if (_close_chunking_ids(min_dset, max_dset, NULL, filespace_ids, dataset_ids, &memspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ return SUCCEED;
+
+error:
+ LOGPRINT(1, "verify_datasets() FAILED\n");
+ (void)_close_chunking_ids(min_dset, max_dset, NULL, filespace_ids, dataset_ids, &memspace_id);
+ return FAIL;
+
+} /* end verify_datasets() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_basic_dataset_write
+ *
+ * Purpose: Create and close files; repoen files and write a dataset,
+ * close; compare files.
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_basic_dataset_write(void)
+{
+ struct mirrortest_filenames names;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5P_DEFAULT;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5T_NATIVE_INT;
+ hsize_t dims[2] = {DATABUFFER_SIZE, DATABUFFER_SIZE};
+ int * buf = NULL;
+ int i = 0;
+ int j = 0;
+
+ TESTING("Mirror open and dataset writing");
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ fapl_id = create_mirroring_split_fapl("basic_write", &names);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ /* Prepare data to be written
+ */
+ buf = (int *)HDmalloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int));
+ if (NULL == buf) {
+ TEST_ERROR;
+ }
+ for (i = 0; i < DATABUFFER_SIZE; i++) {
+ for (j = 0; j < DATABUFFER_SIZE; j++) {
+ int k = i * DATABUFFER_SIZE + j;
+ buf[k] = k;
+ }
+ }
+
+ /* -------------------- */
+ /* TEST: Create and Close */
+
+ file_id = H5Fcreate(names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+
+ /* -------------------- */
+ /* TEST: Repoen and Write */
+
+ file_id = H5Fopen(names.rw, H5F_ACC_RDWR, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ dspace_id = H5Screate_simple(2, dims, NULL);
+ if (H5I_INVALID_HID == dspace_id) {
+ TEST_ERROR;
+ }
+ dset_id = H5Dcreate2(file_id, "dataset", dtype_id, dspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (H5I_INVALID_HID == dset_id) {
+ TEST_ERROR;
+ }
+
+ if (H5Dwrite(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* Standard cleanup */
+
+ HDfree(buf);
+ buf = NULL;
+ if (H5Dclose(dset_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5Sclose(dspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (fapl_id != H5P_DEFAULT && fapl_id > 0) {
+ if (H5Pclose(fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+
+ /* -------------------- */
+ /* TEST: Verify that the R/W and W/O files are identical */
+
+ if (h5_compare_file_bytes(names.rw, names.wo) < 0) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ (void)H5Fclose(file_id);
+ if (buf) {
+ HDfree(buf);
+ }
+ (void)H5Dclose(dset_id);
+ (void)H5Sclose(dspace_id);
+ if (fapl_id != H5P_DEFAULT && fapl_id > 0) {
+ (void)H5Pclose(fapl_id);
+ }
+ }
+ H5E_END_TRY;
+ return -1;
+} /* end test_basic_dataset_write() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_chunked_dataset_write
+ *
+ * Purpose: Create and close files; repoen files and write a dataset,
+ * close; compare files.
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_chunked_dataset_write(void)
+{
+ struct mirrortest_filenames names;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5P_DEFAULT;
+
+ TESTING("Mirror open and dataset writing (chunked)");
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ fapl_id = create_mirroring_split_fapl("chunked_write", &names);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Create and Close */
+
+ file_id = H5Fcreate(names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+
+ /* -------------------- */
+ /* TEST: Reopen and Write */
+
+ file_id = H5Fopen(names.rw, H5F_ACC_RDWR, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ /* Write datasets to file
+ */
+ if (create_datasets(file_id, 0, MAX_DSET_COUNT) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* Close to 'flush to disk', and reopen file
+ */
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+
+ /* Reopen file
+ */
+ file_id = H5Fopen(names.rw, H5F_ACC_RDWR, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ /* Verify written data integrity
+ */
+ if (verify_datasets(file_id, 0, MAX_DSET_COUNT) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* Standard cleanup */
+
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+ if (fapl_id != H5P_DEFAULT && fapl_id > 0) {
+ if (H5Pclose(fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ fapl_id = H5I_INVALID_HID;
+ }
+
+ /* -------------------- */
+ /* TEST: Verify that the R/W and W/O files are identical */
+
+ if (h5_compare_file_bytes(names.rw, names.wo) < 0) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ (void)H5Fclose(file_id);
+ if (fapl_id != H5P_DEFAULT && fapl_id > 0) {
+ (void)H5Pclose(fapl_id);
+ }
+ }
+ H5E_END_TRY;
+ return -1;
+} /* end test_chunked_dataset_write() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_on_disk_zoo
+ *
+ * Purpose: Verify that the mirror can handle the passing of all the
+ * various on-disk data structures over the wire, as implemented
+ * in genall5.c:create_zoo().
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_on_disk_zoo(void)
+{
+ const char grp_name[] = "/only";
+ struct mirrortest_filenames names;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t grp_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5P_DEFAULT;
+
+ TESTING("'Zoo' of on-disk structures");
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ fapl_id = create_mirroring_split_fapl("zoo", &names);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Create file */
+ file_id = H5Fcreate(names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ grp_id = H5Gcreate2(file_id, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (grp_id == H5I_INVALID_HID) {
+ TEST_ERROR;
+ }
+
+ /* Create datasets in file, close (flush) and reopen, validate.
+ * Use of ( pass ) a conceit required for using create_ and validate_zoo()
+ * from cache_common and/or genall5.
+ */
+
+ if (pass) {
+ create_zoo(file_id, grp_name, 0);
+ }
+ if (pass) {
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ file_id = H5Fopen(names.rw, H5F_ACC_RDWR, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+ }
+ if (pass) {
+ validate_zoo(file_id, grp_name, 0); /* sanity-check */
+ }
+ if (!pass) {
+ HDprintf(failure_mssg);
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* Standard cleanup */
+
+ if (fapl_id != H5P_DEFAULT && fapl_id >= 0) {
+ if (H5Pclose(fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+ if (H5Gclose(grp_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Verify that the R/W and W/O files are identical */
+
+ if (h5_compare_file_bytes(names.rw, names.wo) < 0) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ (void)H5Fclose(file_id);
+ (void)H5Gclose(grp_id);
+ if (fapl_id != H5P_DEFAULT && fapl_id > 0) {
+ (void)H5Pclose(fapl_id);
+ }
+ }
+ H5E_END_TRY;
+ return -1;
+} /* end test_on_disk_zoo() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_vanishing_datasets
+ *
+ * Purpose: Verify behavior when writing to a file where data is deleted.
+ *
+ * Each dataset is populated with the value of its suffix
+ * (dset5 is all fives).
+ *
+ * Opens 0..15 create one new dataset each, '/dset[i]'.
+ * Opens 3..18 delete '/dset[1-3]'
+ *
+ * Should end with no data in file.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_vanishing_datasets(void)
+{
+ struct mirrortest_filenames names;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t mirror_fapl_id = H5I_INVALID_HID;
+ hsize_t dims[2] = {DATABUFFER_SIZE, DATABUFFER_SIZE};
+ uint32_t buf[DATABUFFER_SIZE][DATABUFFER_SIZE]; /* consider malloc? */
+ H5G_info_t group_info;
+ unsigned int i, j, k;
+ const unsigned int max_loops = 20;
+ const unsigned int max_at_one_time = 3;
+
+ TESTING("Vanishing Datasets");
+
+ /* -------------------- */
+ /* Set up recurrent data (FAPL, dataspace) */
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ fapl_id = create_mirroring_split_fapl("vanishing", &names);
+ if (H5I_INVALID_HID == fapl_id) {
+ TEST_ERROR;
+ }
+
+ dspace_id = H5Screate_simple(2, dims, NULL);
+ if (dspace_id < 0) {
+ TEST_ERROR;
+ }
+
+ /* create file */
+ file_id = H5Fcreate(names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (H5I_INVALID_HID == file_id) {
+ TEST_ERROR;
+ }
+
+ for (i = 0; i < max_loops; i++) {
+ char namebuf[DSET_NAME_LEN + 1];
+
+ /* deleting datasets */
+ if (i >= max_at_one_time) {
+ if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN) {
+ TEST_ERROR;
+ }
+ if (H5Ldelete(file_id, namebuf, H5P_DEFAULT) < 0) {
+ TEST_ERROR;
+ }
+ } /* end if deleting a dataset */
+
+ /* writing datasets */
+ if (i < (max_loops - max_at_one_time)) {
+ if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN) {
+ TEST_ERROR;
+ }
+ dset_id =
+ H5Dcreate2(file_id, namebuf, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (H5I_INVALID_HID == dset_id) {
+ TEST_ERROR;
+ }
+
+ for (j = 0; j < DATABUFFER_SIZE; j++) {
+ for (k = 0; k < DATABUFFER_SIZE; k++) {
+ buf[j][k] = (uint32_t)i;
+ }
+ }
+
+ if (H5Dwrite(dset_id, H5T_STD_U32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
+ TEST_ERROR;
+ }
+
+ if (H5Dclose(dset_id) < 0) {
+ TEST_ERROR;
+ }
+ dset_id = H5I_INVALID_HID;
+ } /* end if writing a dataset */
+
+ } /* end for dataset create-destroy cycles */
+
+ if (H5Fclose(file_id) < 0) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+
+ /* verify there are no datasets in file */
+ file_id = H5Fopen(names.rw, H5F_ACC_RDONLY, H5P_DEFAULT);
+ if (file_id < 0) {
+ TEST_ERROR;
+ }
+ if (H5Gget_info(file_id, &group_info) < 0) {
+ TEST_ERROR;
+ }
+ if (group_info.nlinks > 0) {
+ HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks);
+ HDfflush(stderr);
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) < 0) {
+ TEST_ERROR;
+ }
+ file_id = H5Fopen(names.wo, H5F_ACC_RDONLY, H5P_DEFAULT);
+ if (file_id < 0) {
+ TEST_ERROR;
+ }
+ if (H5Gget_info(file_id, &group_info) < 0) {
+ TEST_ERROR;
+ }
+ if (group_info.nlinks > 0) {
+ HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks);
+ HDfflush(stderr);
+ TEST_ERROR;
+ }
+ if (H5Fclose(file_id) < 0) {
+ TEST_ERROR;
+ }
+ file_id = H5I_INVALID_HID;
+
+ if (h5_compare_file_bytes(names.rw, names.wo) < 0)
+ TEST_ERROR;
+
+ /* -------------------- */
+ /* Teardown */
+
+ if (H5Sclose(dspace_id) < 0) {
+ TEST_ERROR;
+ }
+ if (H5Pclose(fapl_id) < 0) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ if (mirror_fapl_id != H5I_INVALID_HID) {
+ H5Pclose(mirror_fapl_id);
+ }
+ if (fapl_id != H5I_INVALID_HID) {
+ H5Pclose(fapl_id);
+ }
+ if (file_id != H5I_INVALID_HID) {
+ H5Fclose(file_id);
+ }
+ if (dset_id != H5I_INVALID_HID) {
+ H5Dclose(dset_id);
+ }
+ if (dspace_id != H5I_INVALID_HID) {
+ H5Sclose(dspace_id);
+ }
+ }
+ H5E_END_TRY;
+ return -1;
+} /* test_vanishing_datasets() */
+
+/* ---------------------------------------------------------------------------
+ * Function: test_concurrent_access
+ *
+ * Purpose: Verify that more than one file may be opened at a time.
+ *
+ * TODO: receive target IP from caller?
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Jacob Smith
+ * 2020-03-09
+ * ---------------------------------------------------------------------------
+ */
+static int
+test_concurrent_access(void)
+{
+ struct file_bundle {
+ struct mirrortest_filenames names;
+ hid_t dset_id;
+ hid_t fapl_id;
+ hid_t file_id;
+ } bundle[CONCURRENT_COUNT];
+ hid_t dspace_id = H5I_INVALID_HID;
+ hid_t dtype_id = H5T_NATIVE_INT;
+ hsize_t dims[2] = {DATABUFFER_SIZE, DATABUFFER_SIZE};
+ int * buf = NULL;
+ int i = 0;
+ int j = 0;
+
+ TESTING("Concurrent opened mirrored files");
+
+ /* blank bundle */
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ bundle[i].dset_id = H5I_INVALID_HID;
+ bundle[i].fapl_id = H5I_INVALID_HID;
+ bundle[i].file_id = H5I_INVALID_HID;
+ *bundle[i].names.rw = '\0';
+ *bundle[i].names.wo = '\0';
+ *bundle[i].names.log = '\0';
+ }
+
+ /* Create FAPL for Splitter[sec2|mirror]
+ */
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ char _name[16] = "";
+ hid_t _fapl_id = H5I_INVALID_HID;
+ HDsnprintf(_name, 15, "concurrent%d", i);
+ _fapl_id = create_mirroring_split_fapl(_name, &bundle[i].names);
+ if (H5I_INVALID_HID == _fapl_id) {
+ TEST_ERROR;
+ }
+ bundle[i].fapl_id = _fapl_id;
+ }
+
+ /* Prepare data to be written
+ */
+ buf = (int *)HDmalloc(DATABUFFER_SIZE * DATABUFFER_SIZE * sizeof(int));
+ if (NULL == buf) {
+ TEST_ERROR;
+ }
+ for (i = 0; i < DATABUFFER_SIZE; i++) {
+ for (j = 0; j < DATABUFFER_SIZE; j++) {
+ int k = i * DATABUFFER_SIZE + j;
+ buf[k] = k;
+ }
+ }
+
+ /* Prepare generic dataspace
+ */
+ dspace_id = H5Screate_simple(2, dims, NULL);
+ if (H5I_INVALID_HID == dspace_id) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Create file and open elements */
+
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ hid_t _file_id = H5I_INVALID_HID;
+ hid_t _dset_id = H5I_INVALID_HID;
+
+ _file_id = H5Fcreate(bundle[i].names.rw, H5F_ACC_TRUNC, H5P_DEFAULT, bundle[i].fapl_id);
+ if (H5I_INVALID_HID == _file_id) {
+ TEST_ERROR;
+ }
+
+ bundle[i].file_id = _file_id;
+
+ _dset_id =
+ H5Dcreate2(_file_id, "dataset", dtype_id, dspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (H5I_INVALID_HID == _dset_id) {
+ TEST_ERROR;
+ }
+ bundle[i].dset_id = _dset_id;
+ }
+
+ /* -------------------- */
+ /* TEST: Write to files */
+
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ if (H5Dwrite(bundle[i].dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+
+ /* -------------------- */
+ /* TEST: Close elements */
+
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ if (H5Dclose(bundle[i].dset_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5Fclose(bundle[i].file_id) == FAIL) {
+ TEST_ERROR;
+ }
+ if (H5Pclose(bundle[i].fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+ }
+
+ /* -------------------- */
+ /* Standard cleanup */
+
+ HDfree(buf);
+ buf = NULL;
+ if (H5Sclose(dspace_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ /* -------------------- */
+ /* TEST: Verify that the R/W and W/O files are identical */
+
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ if (h5_compare_file_bytes(bundle[i].names.rw, bundle[i].names.wo) < 0) {
+ TEST_ERROR;
+ }
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ if (buf) {
+ HDfree(buf);
+ }
+ (void)H5Sclose(dspace_id);
+ for (i = 0; i < CONCURRENT_COUNT; i++) {
+ (void)H5Dclose(bundle[i].dset_id);
+ (void)H5Fclose(bundle[i].file_id);
+ (void)H5Pclose(bundle[i].fapl_id);
+ }
+ }
+ H5E_END_TRY;
+ return -1;
+} /* end test_concurrent_access() */
+
+/* ---------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Run tests.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Jacob Smith
+ * 2019
+ * ---------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ int nerrors = 0;
+
+ h5_reset();
+
+ g_log_stream = stdout; /* default debug/logging output stream */
+
+ HDprintf("Testing Mirror VFD functionality.\n");
+
+ /* -------------------- */
+ /* SETUP */
+
+ /* Create directories for test-generated .h5 files
+ */
+ if (nerrors == 0) {
+ if ((HDmkdir(MIRROR_RW_DIR, (mode_t)0755) < 0) && (errno != EEXIST)) {
+ nerrors++;
+ }
+ }
+ if (nerrors == 0) {
+ if ((HDmkdir(MIRROR_WO_DIR, (mode_t)0755) < 0) && (errno != EEXIST)) {
+ nerrors++;
+ }
+ }
+
+ /* -------------------- */
+ /* TESTS */
+ /* Tests return negative values; `-=' increments nerrors count */
+
+ if (nerrors == 0) {
+ nerrors -= test_fapl_configuration();
+ nerrors -= test_xmit_encode_decode();
+ nerrors -= test_create_and_close();
+ nerrors -= test_basic_dataset_write();
+ nerrors -= test_chunked_dataset_write();
+ nerrors -= test_on_disk_zoo();
+ nerrors -= test_vanishing_datasets();
+ nerrors -= test_concurrent_access();
+ }
+
+ if (nerrors) {
+ HDprintf("***** %d Mirror VFD TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ return EXIT_FAILURE;
+ }
+
+ HDprintf("All Mirror Virtual File Driver tests passed.\n");
+ return EXIT_SUCCESS;
+} /* end main() */
+
+#else /* H5_HAVE_MIRROR_VFD */
+
+int
+main(void)
+{
+ h5_reset();
+ HDprintf("Testing Mirror VFD functionality.\n");
+ HDprintf("SKIPPED - Mirror VFD not built.\n");
+ return EXIT_SUCCESS;
+}
+
+#endif /* H5_HAVE_MIRROR_VFD */
diff --git a/test/mount.c b/test/mount.c
index 5256be4..c5ac9b3 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, October 7, 1998
*
* Purpose: Tests file mounting.
@@ -1583,7 +1583,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/M/X"))
+ if (HDstrcmp(objname, "/A/B/M/X") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1598,7 +1598,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1613,7 +1613,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/T"))
+ if (HDstrcmp(objname, "/A/B/T") != 0)
TEST_ERROR
/* Close object in original file */
@@ -1628,7 +1628,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/M/X/Y/D"))
+ if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1801,7 +1801,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/M/X/X"))
+ if (HDstrcmp(objname, "/A/M/X/X") != 0)
TEST_ERROR
/* Open group in mounted file #2 */
@@ -1821,7 +1821,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/M/X/M/Y"))
+ if (HDstrcmp(objname, "/A/M/X/M/Y") != 0)
TEST_ERROR
/* Unmount second file */
@@ -1832,7 +1832,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/M/Y"))
+ if (HDstrcmp(objname, "/X/M/Y") != 0)
TEST_ERROR
/* Rename object in file #3 that is "disconnected" from name hiearchy */
@@ -1852,7 +1852,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/M/Z"))
+ if (HDstrcmp(objname, "/X/M/Z") != 0)
TEST_ERROR
/* Mount fourth file */
@@ -1868,7 +1868,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/B/M/Z"))
+ if (HDstrcmp(objname, "/B/M/Z") != 0)
TEST_ERROR
/* Unmount third file */
@@ -3140,7 +3140,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/A/M/T"))
+ if (HDstrcmp(name, "/A/M/T") != 0)
TEST_ERROR
/* Create object in file #3 */
@@ -3158,7 +3158,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/B/S"))
+ if (HDstrcmp(name, "/B/S") != 0)
TEST_ERROR
/* Re-open object created in file #3 through file #1 mount path */
@@ -3339,7 +3339,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
TEST_ERROR
/* Unmount file #2 from file #1 */
@@ -3350,7 +3350,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len != 0 || HDstrcmp(name, ""))
+ if (name_len != 0 || HDstrcmp(name, "") != 0)
TEST_ERROR
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -3370,7 +3370,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/M/S"))
+ if (HDstrcmp(name, "/M/S") != 0)
TEST_ERROR
/* Close group in file #3 */
@@ -3389,7 +3389,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/A/M/S"))
+ if (HDstrcmp(name, "/A/M/S") != 0)
TEST_ERROR
/* Close group in file #3 */
@@ -3538,7 +3538,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
TEST_ERROR
/* Unmount file #2 from file #1, closing file #1 */
@@ -3549,7 +3549,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/M"))
+ if (name_len == 0 || HDstrcmp(name, "/M") != 0)
TEST_ERROR
/* Just file #2's underlying shared file should be open still */
@@ -3816,7 +3816,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/E/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0)
TEST_ERROR
/* Open object in file #7 */
@@ -3827,7 +3827,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
TEST_ERROR
/* Close file #1 */
@@ -3887,7 +3887,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/D/K"))
+ if (name_len == 0 || HDstrcmp(name, "/D/K") != 0)
TEST_ERROR
if (H5Gclose(gidK) < 0)
@@ -3910,7 +3910,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/H/O"))
+ if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0)
TEST_ERROR
if (H5Gclose(gidO) < 0)
@@ -3920,14 +3920,14 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/E/M"))
+ if (name_len == 0 || HDstrcmp(name, "/E/M") != 0)
TEST_ERROR
/* Check the name of "Q" is still defined */
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
TEST_ERROR
/* Check that all seven underlying files are still opened */
@@ -3952,7 +3952,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0)
TEST_ERROR
/* Open object in file #6 from file #7 */
@@ -3963,7 +3963,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/H/O"))
+ if (name_len == 0 || HDstrcmp(name, "/H/O") != 0)
TEST_ERROR
if (H5Gclose(gidO) < 0)
@@ -4132,7 +4132,7 @@ test_symlink(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/L"))
+ if (name_len == 0 || HDstrcmp(name, "/L") != 0)
TEST_ERROR
/* Close file #1 */
diff --git a/test/mtime.c b/test/mtime.c
index b925692..43dc502 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 30, 1998
*
* Purpose: Determines if the modification time message is working
@@ -120,7 +120,7 @@ main(void)
HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
- else if (HDfabs(HDdifftime(now, oi1.ctime)) > (double)60.0F) {
+ else if (HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
@@ -147,7 +147,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- puts(" Old modification time incorrect");
+ HDputs(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
diff --git a/test/ntypes.c b/test/ntypes.c
index 1260b0c..13cc72a 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -6,16 +6,16 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* October 14, 2001
*
- * Purpose: Tests the H5Tget_native_type function.
+ * Purpose: Tests the H5Tget_native_type function.
*/
#include "h5test.h"
@@ -57,16 +57,16 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
#define BITFIELD_ENUMB 8
/*-------------------------------------------------------------------------
- * Function: test_atomic_dtype
+ * Function: test_atomic_dtype
*
- * Purpose: Test H5Tget_native_type for atomic datatype
+ * Purpose: Test H5Tget_native_type for atomic datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -291,16 +291,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype2
+ * Function: test_compound_dtype2
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -621,16 +621,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype
+ * Function: test_compound_dtype
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -834,16 +834,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype3
+ * Function: test_compound_dtype3
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1075,16 +1075,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_opaque
+ * Function: test_compound_opaque
*
- * Purpose: Test H5Tget_native_type for compound datatype with opaque field
+ * Purpose: Test H5Tget_native_type for compound datatype with opaque field
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Quincey Koziol
- * January 31, 2004
+ * Programmer: Quincey Koziol
+ * January 31, 2004
*
* Modifications:
*
@@ -1302,16 +1302,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_enum_dtype
+ * Function: test_enum_dtype
*
- * Purpose: Test H5Tget_native_type for enumerate datatype
+ * Purpose: Test H5Tget_native_type for enumerate datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1446,16 +1446,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_array_dtype
+ * Function: test_array_dtype
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1634,16 +1634,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_array_dtype2
+ * Function: test_array_dtype2
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1769,16 +1769,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_vl_dtype
+ * Function: test_vl_dtype
*
- * Purpose: Test H5Tget_native_type for variable length datatype
+ * Purpose: Test H5Tget_native_type for variable length datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1975,16 +1975,16 @@ error:
} /* end test_vl_type() */
/*-------------------------------------------------------------------------
- * Function: test_vlstr_dtype
+ * Function: test_vlstr_dtype
*
- * Purpose: Test H5Tget_native_type for variable length string datatype
+ * Purpose: Test H5Tget_native_type for variable length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1993,19 +1993,17 @@ error:
static herr_t
test_vlstr_dtype(hid_t file)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1] = {
"Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
- "testing whether that nation or any nation so conceived and so dedicated can long endure."}; /* Information
- to
- write
- */
+ "testing whether that nation or any nation so conceived and so dedicated can long endure."};
char * rdata[SPACE1_DIM1]; /* Information read in */
hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2117,16 +2115,16 @@ error:
} /* end test_vlstr_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_str_dtype
+ * Function: test_str_dtype
*
- * Purpose: Test H5Tget_native_type for fixed-length string datatype
+ * Purpose: Test H5Tget_native_type for fixed-length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2137,9 +2135,9 @@ test_str_dtype(hid_t file)
{
const char wdata[SPACE1_DIM1][4] = {"one", "two", "3rd", "4th"}; /* Information to write */
char rdata[SPACE1_DIM1][4]; /* Information read in */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2239,16 +2237,16 @@ error:
} /* end test_str_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype
+ * Function: test_refer_dtype
*
- * Purpose: Test H5Tget_native_type for reference datatype
+ * Purpose: Test H5Tget_native_type for reference datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2264,10 +2262,10 @@ test_refer_dtype(hid_t file)
float c;
} s1_t;
- hid_t dataset = -1; /* Dataset ID */
+ hid_t dataset = -1; /* Dataset ID */
hid_t group = -1; /* Group ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {1};
H5O_type_t obj_type; /* Object type */
hobj_ref_t *wbuf = NULL, /* buffer to write to disk */
@@ -2412,16 +2410,16 @@ error:
} /* test_refer_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype2
+ * Function: test_refer_dtype2
*
- * Purpose: Test H5Tget_native_type for reference
+ * Purpose: Test H5Tget_native_type for reference
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2430,10 +2428,10 @@ error:
static herr_t
test_refer_dtype2(hid_t file)
{
- hid_t dset1 = -1, /* Dataset ID */
+ hid_t dset1 = -1, /* Dataset ID */
dset2 = -1; /* Dereferenced dataset ID */
- hid_t sid1 = -1, /* Dataspace ID #1 */
- sid2 = -1; /* Dataspace ID #2 */
+ hid_t sid1 = -1, /* Dataspace ID #1 */
+ sid2 = -1; /* Dataspace ID #2 */
hid_t dtype = -1, native_type = -1;
hsize_t dims1[] = {1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
@@ -2626,16 +2624,16 @@ error:
} /* test_refer_dtype2() */
/*-------------------------------------------------------------------------
- * Function: test_opaque_dtype
+ * Function: test_opaque_dtype
*
- * Purpose: Test H5Tget_native_type for opaque datatype
+ * Purpose: Test H5Tget_native_type for opaque datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2725,16 +2723,16 @@ error:
} /* test_opaque_dtype */
/*-------------------------------------------------------------------------
- * Function: test_bitfield_dtype
+ * Function: test_bitfield_dtype
*
- * Purpose: Test H5Tget_native_type for bitfield datatype
+ * Purpose: Test H5Tget_native_type for bitfield datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
* Raymond Lu
@@ -2892,7 +2890,7 @@ error:
* Return: Success: 0
* Failure: -1
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* September 3, 2004
*
* Modifications:
@@ -3100,12 +3098,12 @@ error:
} /* end test_ninteger() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test H5Tget_native_type for different datatype
+ * Purpose: Test H5Tget_native_type for different datatype
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
diff --git a/test/null_vol_connector.c b/test/null_vol_connector.c
index 095169c..70237eb 100644
--- a/test/null_vol_connector.c
+++ b/test/null_vol_connector.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -26,7 +26,7 @@
/* The VOL class struct */
static const H5VL_class_t null_vol_g = {
- 0, /* version */
+ H5VL_VERSION, /* VOL class struct version */
NULL_VOL_CONNECTOR_VALUE, /* value */
NULL_VOL_CONNECTOR_NAME, /* name */
0, /* capability flags */
diff --git a/test/null_vol_connector.h b/test/null_vol_connector.h
index e4c7cd894..8fe9abe 100644
--- a/test/null_vol_connector.h
+++ b/test/null_vol_connector.h
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,10 +15,10 @@
* (registration, etc.).
*/
-#ifndef _null_vol_connector_H
-#define _null_vol_connector_H
+#ifndef NULL_VOL_CONNECTOR_H
+#define NULL_VOL_CONNECTOR_H
#define NULL_VOL_CONNECTOR_VALUE ((H5VL_class_value_t)160)
#define NULL_VOL_CONNECTOR_NAME "null_vol_connector"
-#endif /* _null_vol_connector_H */
+#endif /* NULL_VOL_CONNECTOR_H */
diff --git a/test/objcopy.c b/test/objcopy.c
index a9ddff7..43a5756 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1103,7 +1103,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size))
+ if (HDmemcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR
/* Update member pointers */
@@ -1325,7 +1325,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)))
+ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR
/* Data should be the same. :-) */
@@ -1596,7 +1596,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, objname2))
+ if (HDstrcmp(objname, objname2) != 0)
TEST_ERROR
/* Get link info */
@@ -1710,7 +1710,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
TEST_ERROR
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size))
+ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR
} /* end else-if */
else {
@@ -2936,7 +2936,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
HDmemset(buf, 0, sizeof(buf));
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
- buf[i].d = (double)1.0F / (double)(i + 1);
+ buf[i].d = 1.0 / (double)(i + 1);
} /* end for */
/* Initialize the filenames */
@@ -4499,7 +4499,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4924,7 +4924,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -7030,7 +7030,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR
if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
FAIL_STACK_ERROR
- if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)))
+ if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
FAIL_STACK_ERROR
/* Reclaim vlen buffer */
@@ -7278,7 +7278,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
@@ -11700,9 +11700,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close datasets */
@@ -11745,9 +11745,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */
@@ -11907,9 +11907,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Create destination file */
@@ -11952,9 +11952,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 2a97892..23df121 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -887,7 +887,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size))
+ if (HDmemcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR
/* Update member pointers */
@@ -1035,7 +1035,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)))
+ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR
/* Data should be the same. :-) */
@@ -1306,7 +1306,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, objname2))
+ if (HDstrcmp(objname, objname2) != 0)
TEST_ERROR
/* Get link info */
@@ -1420,7 +1420,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
TEST_ERROR
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size))
+ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR
} /* end else-if */
else {
diff --git a/test/ohdr.c b/test/ohdr.c
index cdda240..e28dad0 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
#include "h5test.h"
@@ -121,8 +121,12 @@ test_cont(char *filename, hid_t fapl)
FAIL_STACK_ERROR
if (1 != H5O_link(&oh_locB, 1))
FAIL_STACK_ERROR
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5O__expunge_chunks_test(&oh_locA) < 0)
FAIL_STACK_ERROR
@@ -788,7 +792,7 @@ count_attributes(hid_t dset_id)
* On success, stores size in `size_out` pointer.
*/
static herr_t
-_oh_getsize(hid_t did, hsize_t *size_out)
+oh_getsize(hid_t did, hsize_t *size_out)
{
H5O_native_info_t ninfo;
@@ -811,9 +815,9 @@ oh_compare(hid_t did1, hid_t did2)
hsize_t space1 = 0;
hsize_t space2 = 0;
- if (FAIL == _oh_getsize(did1, &space1))
+ if (FAIL == oh_getsize(did1, &space1))
return -1;
- if (FAIL == _oh_getsize(did2, &space2))
+ if (FAIL == oh_getsize(did2, &space2))
return -2;
if (space1 < space2)
@@ -915,7 +919,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf))
+ if (HDstrcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* modify the string attribute */
@@ -930,7 +934,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf))
+ if (HDstrcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* Close */
@@ -1184,7 +1188,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id)
TEST_ERROR if (H5Dclose(dset_F_N_id) < 0) TEST_ERROR if (H5Dclose(dset_F_Y_id) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
} /* compact and non-compact */
@@ -1348,7 +1352,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id)
if (H5Fclose(file_id) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
return SUCCEED;
error:
@@ -1567,7 +1571,7 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id)
if (H5Pclose(dcpl_mN_id) < 0)
TEST_ERROR
- PASSED()
+ PASSED();
return SUCCEED;
error:
@@ -1707,7 +1711,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id)
if (H5Fclose(file_id) < 0)
TEST_ERROR;
- PASSED()
+ PASSED();
return SUCCEED;
error:
@@ -1761,8 +1765,8 @@ main(void)
env_h5_drvr = "nomatch";
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
/* Reset library */
h5_reset();
@@ -1829,8 +1833,12 @@ main(void)
FAIL_STACK_ERROR
if (1 != H5O_link(&oh_loc, 1))
FAIL_STACK_ERROR
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
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))
@@ -1846,8 +1854,12 @@ main(void)
time_new = 33333333;
if (H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
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))
@@ -1877,8 +1889,12 @@ main(void)
if (H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
} /* end for */
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_expunge_entry(f, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
@@ -1920,8 +1936,12 @@ main(void)
time_new = (i + 1) * 1000 + 10;
if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_expunge_entry(f, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1949,8 +1969,12 @@ main(void)
time_new = 22222222;
if (H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new) < 0)
FAIL_STACK_ERROR
+ if (H5AC_prep_for_file_flush(f) < 0)
+ FAIL_STACK_ERROR
if (H5AC_flush(f) < 0)
FAIL_STACK_ERROR
+ if (H5AC_secure_from_file_flush(f) < 0)
+ FAIL_STACK_ERROR
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))
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 2b36f83..8299de8 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -349,7 +349,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
} /* end if */
@@ -383,7 +383,6 @@ error:
*
*-------------------------------------------------------------------------
*/
-
static unsigned
test_args(hid_t orig_fapl, const char *env_h5_drvr)
{
@@ -528,7 +527,7 @@ test_args(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
error:
@@ -803,7 +802,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -1057,7 +1056,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -1688,7 +1687,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
HDfree(data);
- PASSED()
+ PASSED();
return 0;
@@ -1993,7 +1992,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
HDfree(data);
- PASSED()
+ PASSED();
return 0;
error:
@@ -2111,7 +2110,7 @@ verify_page_buffering_disabled(hid_t orig_fapl, const char *env_h5_drvr)
if (H5Pclose(fapl) < 0)
FAIL_STACK_ERROR;
- PASSED()
+ PASSED();
return 0;
diff --git a/test/pool.c b/test/pool.c
index f34a3cc..9ce1846 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -6,12 +6,12 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*/
#include "h5test.h"
@@ -660,10 +660,10 @@ test_allocate_random(void)
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1115412944;
- HDfprintf(stderr, "curr_time=%lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time=1115412944;
+HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/* Create a memory pool */
@@ -784,11 +784,11 @@ main(void)
if (nerrors)
goto error;
- puts("All memory pool tests passed.");
+ HDputs("All memory pool tests passed.");
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
return 1;
}
diff --git a/test/reserved.c b/test/reserved.c
index e4d91d3..6e41a16 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -126,7 +126,7 @@ rsrv_heap(void)
/* If we can read a dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
@@ -268,7 +268,7 @@ rsrv_ohdr(void)
/* If we can read the dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
@@ -432,7 +432,7 @@ rsrv_vlen(void)
/* If we can read the dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
diff --git a/test/ros3.c b/test/ros3.c
index fd5ce78..2d4bcf0 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -20,7 +20,7 @@
*
* Demonstrates basic use cases and fapl/dxpl interaction.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
@@ -193,15 +193,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), (reason)); \
}
/*----------------------------------------------------------------------------
@@ -232,15 +238,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT
@@ -306,7 +318,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -351,7 +363,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -548,8 +560,8 @@ test_fapl_config_validation(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -829,8 +841,8 @@ test_vfd_open(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -972,15 +984,15 @@ test_eof_eoa(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1083,15 +1095,15 @@ test_H5FDread_without_eoa_set_fails(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1257,15 +1269,15 @@ test_read(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1401,8 +1413,8 @@ test_noops_and_autofails(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1530,15 +1542,15 @@ test_cmp(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1654,15 +1666,15 @@ test_H5F_integration(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1709,7 +1721,7 @@ error:
* CLEANUP *
***********/
HDprintf("\nerror!");
- fflush(stdout);
+ HDfflush(stdout);
if (fapl_id >= 0) {
H5E_BEGIN_TRY
diff --git a/test/s3comms.c b/test/s3comms.c
index 728501d..22d647f 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Purpose: Unit tests for the S3 Communications (s3comms) module.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
@@ -181,15 +181,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), reason); \
}
/*----------------------------------------------------------------------------
@@ -220,15 +226,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT
@@ -299,7 +311,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -347,7 +359,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -1269,10 +1281,10 @@ test_HMAC_SHA256(void)
cases[i].msg);
if (cases[i].ret == SUCCEED) {
#ifdef VERBOSE
- if (0 != strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
+ if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
- dest = (char *)realloc(dest, cases[i].dest_size + 1);
+ dest = (char *)HDrealloc(dest, cases[i].dest_size + 1);
HDassert(dest != NULL);
dest[cases[i].dest_size] = 0;
HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest);
@@ -1281,17 +1293,17 @@ test_HMAC_SHA256(void)
#else /* VERBOSE not defined */
/* simple pass/fail test
*/
- JSVERIFY(0, strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
+ JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
- free(dest);
+ HDfree(dest);
}
PASSED();
return 0;
error:
- free(dest);
+ HDfree(dest);
return -1;
} /* end test_HMAC_SHA256() */
@@ -1357,9 +1369,9 @@ test_nlowercase(void)
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
- JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL)
+ JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
}
- free(dest);
+ HDfree(dest);
} /* end for each testcase */
JSVERIFY(FAIL, H5FD_s3comms_nlowercase(NULL, cases[0].in, cases[0].len), "null distination should fail")
@@ -1368,7 +1380,7 @@ test_nlowercase(void)
return 0;
error:
- free(dest);
+ HDfree(dest);
return -1;
} /* end test_nlowercase() */
@@ -1729,7 +1741,7 @@ test_percent_encode_char(void)
JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len),
NULL)
JSVERIFY(cases[i].exp_len, dest_len, NULL)
- JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL)
+ JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL)
JSVERIFY_STR(cases[i].exp, dest, NULL)
}
@@ -1768,8 +1780,8 @@ test_s3r_get_filesize(void)
*/
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1828,14 +1840,14 @@ test_s3r_open(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1861,7 +1873,7 @@ test_s3r_open(void)
FAIL_IF(purl->port == NULL);
FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
}
- else if (strcmp(purl->port, "9000") != 0) {
+ else if (HDstrcmp(purl->port, "9000") != 0) {
FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
}
else {
@@ -2032,8 +2044,8 @@ test_s3r_read(void)
*/
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -2093,7 +2105,7 @@ test_s3r_read(void)
JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL)
JSVERIFY(
0,
- strncmp(
+ HDstrncmp(
buffer,
"And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n",
94),
@@ -2110,7 +2122,7 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */
buffer),
NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/************************
* read starts past eof *
@@ -2120,14 +2132,14 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */
(size_t)100, buffer),
NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/**********************
* read starts on eof *
**********************/
JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/*************
* TEAR DOWN *
@@ -2217,10 +2229,10 @@ test_signing_key(void)
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
- JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
- cases[i].exp)
+ JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
+ (const char *)cases[i].exp)
- free(key);
+ HDfree(key);
key = NULL;
}
@@ -2243,7 +2255,7 @@ test_signing_key(void)
JSVERIFY(FAIL, H5FD_s3comms_signing_key(key, cases[0].secret_key, cases[0].region, NULL),
"time string cannot be NULL")
- free(key);
+ HDfree(key);
key = NULL;
PASSED();
@@ -2251,7 +2263,7 @@ test_signing_key(void)
error:
if (key != NULL) {
- free(key);
+ HDfree(key);
}
return -1;
@@ -2399,9 +2411,9 @@ test_trim(void)
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
JSVERIFY(cases[i].exp_len, dest_len, cases[i].in)
if (dest_len > 0) {
- JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp)
+ JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
- free(str);
+ HDfree(str);
str = NULL;
} /* end for each testcase */
@@ -2412,9 +2424,9 @@ test_trim(void)
HDassert(str == NULL);
str = (char *)HDmalloc(sizeof(char *) * 11);
HDassert(str != NULL);
- memcpy(str, "some text ", 11); /* string with null terminator */
+ HDmemcpy(str, "some text ", 11); /* string with null terminator */
JSVERIFY(FAIL, H5FD_s3comms_trim(NULL, str, 10, &dest_len), "destination for trim cannot be NULL");
- free(str);
+ HDfree(str);
str = NULL;
PASSED();
@@ -2422,7 +2434,7 @@ test_trim(void)
error:
if (str != NULL) {
- free(str);
+ HDfree(str);
}
return -1;
@@ -2513,9 +2525,9 @@ test_uriencode(void)
H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written),
NULL);
JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
- JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected);
+ JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
- free(dest);
+ HDfree(dest);
dest = NULL;
} /* end for each testcase */
@@ -2531,7 +2543,7 @@ test_uriencode(void)
JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, false, &dest_written),
"source string cannot be NULL");
- free(dest);
+ HDfree(dest);
dest = NULL;
PASSED();
@@ -2539,7 +2551,7 @@ test_uriencode(void)
error:
if (dest != NULL) {
- free(dest);
+ HDfree(dest);
}
return -1;
diff --git a/test/set_extent.c b/test/set_extent.c
index 90257ac..5a07362 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* April 12, 2002
*
* Purpose: Tests the H5Dset_extent call
@@ -121,7 +121,7 @@ main(void)
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Initialize random number seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -2086,7 +2086,6 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
H5E_BEGIN_TRY
{
-
ret = H5Dset_extent(did, dims_e);
}
H5E_END_TRY;
@@ -2136,7 +2135,6 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
H5E_BEGIN_TRY
{
-
ret = H5Dset_extent(did, dims_s);
}
H5E_END_TRY;
@@ -2638,7 +2636,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
TEST_ERROR
if (H5Treclaim(type, mspace, H5P_DEFAULT, wbuf) < 0)
TEST_ERROR
- free(fill_value.p);
+ HDfree(fill_value.p);
if (H5Sclose(mspace) < 0)
TEST_ERROR
if (H5Pclose(my_dcpl) < 0)
@@ -2694,6 +2692,4 @@ test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4
(unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]);
if (j >= 0)
HDprintf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m);
-
- return;
} /* end test_random_rank4_dump */
diff --git a/test/space_overflow.c b/test/space_overflow.c
index c712ab6..f235670 100644
--- a/test/space_overflow.c
+++ b/test/space_overflow.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, October 26, 1998
*
* Purpose: Create a dataset with a simple data space that has the
diff --git a/test/stab.c b/test/stab.c
index 6306ebc..798619d 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
@@ -134,7 +134,7 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(comment, "hello world")) {
+ if (HDstrcmp(comment, "hello world") != 0) {
H5_FAILED();
HDputs(" Read the wrong comment string from the group.");
HDprintf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
@@ -190,7 +190,7 @@ error:
*
* Failure: number of errors
*
- * Programmer: Robb Matzke <matzke@llnl.gov> 2002-03-28
+ * Programmer: Robb Matzke 2002-03-28
*
* Modifications:
*-------------------------------------------------------------------------
@@ -1279,7 +1279,7 @@ old_api(hid_t fapl)
PASSED();
#else /* H5_NO_DEPRECATED_SYMBOLS */
/* Shut compiler up */
- fapl = fapl;
+ (void)fapl;
SKIPPED();
HDputs(" Deprecated API symbols not enabled");
@@ -1425,7 +1425,7 @@ main(void)
env_h5_drvr = "nomatch";
/* VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
diff --git a/test/swmr.c b/test/swmr.c
index 8944b85..24a0b7c 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -87,7 +87,7 @@ static int test_file_lock_concur(hid_t fapl);
static int test_file_lock_swmr_concur(hid_t fapl);
/* Test file lock environment variable */
-static int test_file_lock_env_var(hid_t fapl);
+static int test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override);
/* Tests for SWMR VFD flag */
static int test_swmr_vfd_flag(void);
@@ -847,14 +847,17 @@ error:
static int
test_metadata_read_retry_info(hid_t in_fapl)
{
- hid_t fapl, new_fapl; /* File access property list */
- hid_t fid, fid1; /* File IDs */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t new_fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
H5F_retry_info_t info, info1; /* The collection of metadata retries */
H5F_t * f = NULL, *f1 = NULL; /* Internal file object pointers */
unsigned i, j, n; /* Local index variables */
- hid_t did1, did2; /* Dataset IDs */
- hid_t sid; /* Dataspace ID */
- hid_t dcpl; /* Dataset creation property list */
+ hid_t did1 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
hsize_t dims[2] = {6, 10}; /* Dataset dimensions */
char filename[NAME_BUF_SIZE]; /* File name */
int buf[6][10], chkbuf1[6][10], chkbuf2[6][10]; /* Buffers for data */
@@ -1623,7 +1626,7 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Should be 100 */
- if (attempts != (new_format ? H5F_METADATA_READ_ATTEMPTS : H5F_SWMR_METADATA_READ_ATTEMPTS))
+ if (attempts != (unsigned int)(new_format ? H5F_METADATA_READ_ATTEMPTS : H5F_SWMR_METADATA_READ_ATTEMPTS))
TEST_ERROR;
/* Close the property list */
@@ -2392,17 +2395,24 @@ error:
* (5) Parent: open a file with write access; enable SWMR writing mode
* Child: concurrent open of the file with write and SWMR write access (fail)
*/
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
+#ifndef H5_HAVE_UNISTD_H
static int
-test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSED new_format)
+test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
{
+ if (new_format) {
+ TESTING("H5Fstart_swmr_write()--concurrent access for latest format");
+ }
+ else {
+ TESTING("H5Fstart_swmr_write()--concurrent access for non-latest-format");
+ }
+
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ HDputs(" Test skipped due to a lack of unistd.h functionality.");
return 0;
} /* test_start_swmr_write_concur() */
-#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
+#else /* H5_HAVE_UNISTD_H */
static int
test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
@@ -2434,7 +2444,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
else {
TESTING("H5Fstart_swmr_write()--concurrent access for non-latest-format");
- } /* end if */
+ }
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
@@ -3004,7 +3014,7 @@ error:
return -1;
} /* test_start_swmr_write_concur() */
-#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
+#endif /* H5_HAVE_UNISTD_H */
/*
* test_start_swmr_write_stress_ohdr():
@@ -4332,8 +4342,11 @@ test_file_lock_same(hid_t in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--single process access");
+ /* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
+ if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ FAIL_STACK_ERROR
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
@@ -4489,14 +4502,15 @@ error:
static int
test_file_lock_swmr_same(hid_t in_fapl)
{
- hid_t fid, fid2; /* File IDs */
- hid_t fapl; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File IDs */
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
/* Output message about test being performed */
TESTING("File open with different combinations of flags + SWMR flags--single process access");
- /* Get a copy of the parameter in_fapl */
+ /* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
@@ -4795,7 +4809,7 @@ error:
** This is for concurrent access.
**
*****************************************************************/
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK))
+#ifndef H5_HAVE_UNISTD_H
static int
test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
@@ -4803,12 +4817,12 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork, waitpid, or flock not defined.");
+ HDputs(" Test skipped due to a lack of unistd.h functionality.");
return 0;
} /* end test_file_lock_concur() */
-#else
+#else /* H5_HAVE_UNISTD_H */
static int
test_file_lock_concur(hid_t in_fapl)
@@ -4825,8 +4839,11 @@ test_file_lock_concur(hid_t in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
+ /* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
+ if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ FAIL_STACK_ERROR
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
@@ -5175,7 +5192,7 @@ error:
} /* end test_file_lock_concur() */
-#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK)) */
+#endif /* H5_HAVE_UNISTD_H */
/****************************************************************
**
@@ -5185,7 +5202,7 @@ error:
** This is for concurrent access.
**
*****************************************************************/
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
+#ifndef H5_HAVE_UNISTD_H
static int
test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
@@ -5193,12 +5210,12 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ HDputs(" Test skipped due to a lack of unistd.h functionality.");
return 0;
} /* end test_file_lock_swmr_concur() */
-#else
+#else /* H5_HAVE_UNISTD_H */
static int
test_file_lock_swmr_concur(hid_t in_fapl)
@@ -5215,8 +5232,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
+ /* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
+ if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
+ FAIL_STACK_ERROR
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[2], fapl, filename, sizeof(filename));
@@ -5730,7 +5750,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Open the test file */
H5E_BEGIN_TRY
{
- child_fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
}
H5E_END_TRY;
@@ -6065,7 +6085,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
FAIL_STACK_ERROR
/* Open the test file */
- if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
/* Notify child process */
@@ -6195,42 +6215,73 @@ error:
} /* end test_file_lock_swmr_concur() */
-#endif /* !(defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID)) */
+#endif /* H5_HAVE_UNISTD_H */
/****************************************************************
**
-** test_file_lock_swmr_concur(): low-level file test routine.
-** With the implementation of file locking, this test checks file
-** open with different combinations of flags + SWMR flags.
-** This is for concurrent access.
+** test_file_locking():
+** Tests various combinations of file locking flags and
+** and environment variables.
**
*****************************************************************/
static int
-test_file_lock_env_var(hid_t in_fapl)
+test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override)
{
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
+#ifndef H5_HAVE_UNISTD_H
+ if (turn_locking_on && env_var_override)
+ TESTING("File locking: ON w/ env var override")
+ else if (turn_locking_on && !env_var_override)
+ TESTING("File locking: ON")
+ else if (!turn_locking_on && env_var_override)
+ TESTING("File locking: OFF w/ env var override")
+ else
+ TESTING("File locking: OFF")
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ HDputs(" Test skipped due to a lack of unistd.h functionality.");
return 0;
-#else
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- char filename[NAME_BUF_SIZE]; /* file name */
- pid_t childpid = 0; /* Child process ID */
- int child_status; /* Status passed to waitpid */
- int child_wait_option = 0; /* Options passed to waitpid */
- int out_pdf[2];
- int notify = 0;
-
- TESTING("File locking environment variable");
+#else /* H5_HAVE_UNISTD_H */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* file name */
+ pid_t childpid = 0; /* Child process ID */
+ int child_status; /* Status passed to waitpid */
+ int child_wait_option = 0; /* Options passed to waitpid */
+ int out_pdf[2];
+ int notify = 0;
+ int exit_status = 0;
+ herr_t ret;
+
+ if (turn_locking_on && env_var_override)
+ TESTING("File locking: ON w/ env var override")
+ else if (turn_locking_on && !env_var_override)
+ TESTING("File locking: ON")
+ else if (!turn_locking_on && env_var_override)
+ TESTING("File locking: OFF w/ env var override")
+ else
+ TESTING("File locking: OFF")
- /* Set the environment variable */
- if (HDsetenv("HDF5_USE_FILE_LOCKING", "FALSE", TRUE) < 0)
+ /* Copy the incoming fapl */
+ if ((fapl = H5Pcopy(in_fapl)) < 0)
TEST_ERROR
- if ((fapl = H5Pcopy(in_fapl)) < 0)
+ /* Set locking in the fapl */
+ if (H5Pset_file_locking(fapl, turn_locking_on ? TRUE : FALSE, TRUE) < 0)
TEST_ERROR
+ /* If requested, set the environment variable */
+ if (env_var_override) {
+ if (HDsetenv("HDF5_USE_FILE_LOCKING", turn_locking_on ? "FALSE" : "TRUE", TRUE) < 0)
+ TEST_ERROR
+ if (H5F__reparse_file_lock_variable_test() < 0)
+ TEST_ERROR
+ }
+ else {
+ if (HDsetenv("HDF5_USE_FILE_LOCKING", "", TRUE) < 0)
+ TEST_ERROR
+ if (H5F__reparse_file_lock_variable_test() < 0)
+ TEST_ERROR
+ }
+
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
@@ -6242,10 +6293,8 @@ test_file_lock_env_var(hid_t in_fapl)
if (H5Fclose(fid) < 0)
TEST_ERROR
- /* Open a file for read-only and then read-write. This would
- * normally fail due to the file locking scheme but should
- * pass when the environment variable is set to disable file
- * locking.
+ /* Open a file for read-only and then read-write. This will fail
+ * when the locking scheme is turned on.
*/
/* Create 1 pipe */
@@ -6260,7 +6309,7 @@ test_file_lock_env_var(hid_t in_fapl)
/* Child process */
- hid_t child_fid; /* File ID */
+ hid_t child_fid = H5I_INVALID_HID; /* File ID */
int child_notify = 0;
/* Close unused write end for out_pdf */
@@ -6271,18 +6320,25 @@ test_file_lock_env_var(hid_t in_fapl)
while (child_notify != 1) {
if (HDread(out_pdf[0], &child_notify, sizeof(int)) < 0)
HDexit(EXIT_FAILURE);
- } /* end while */
+ }
- /* Open the test file */
- if ((child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ /* Open and close the test file */
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ ret = H5Fclose(child_fid);
+ }
+ H5E_END_TRY;
/* Close the pipe */
if (HDclose(out_pdf[0]) < 0)
HDexit(EXIT_FAILURE);
- HDexit(EXIT_SUCCESS);
- } /* end if */
+ if (H5I_INVALID_HID == child_fid || FAIL == ret)
+ HDexit(EXIT_FAILURE);
+ else
+ HDexit(EXIT_SUCCESS);
+ } /* end child process work */
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
@@ -6305,15 +6361,28 @@ test_file_lock_env_var(hid_t in_fapl)
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
TEST_ERROR
- /* Check if child terminated normally */
- if (WIFEXITED(child_status)) {
- /* Check exit status of the child */
- if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
- } /* end if */
+ /* Check exit status of the child */
+ if (WIFEXITED(child_status))
+ exit_status = WEXITSTATUS(child_status);
else
TEST_ERROR
+ /* The child process should have passed or failed as follows:
+ *
+ * locks on: FAIL
+ * locks off: PASS
+ * locks on, env var override: PASS
+ * locks off, env var override: FAIL
+ */
+ if (turn_locking_on && !env_var_override && (0 == exit_status))
+ TEST_ERROR
+ else if (!turn_locking_on && !env_var_override && (0 != exit_status))
+ TEST_ERROR
+ else if (turn_locking_on && env_var_override && (0 != exit_status))
+ TEST_ERROR
+ else if (!turn_locking_on && env_var_override && (0 == exit_status))
+ TEST_ERROR
+
/* Close the file */
if (H5Fclose(fid) < 0)
TEST_ERROR
@@ -6336,9 +6405,86 @@ error:
return -1;
-#endif /* !(defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID)) */
+#endif /* H5_HAVE_UNISTD_H */
-} /* end test_file_lock_env_var() */
+} /* end test_file_locking() */
+
+/****************************************************************
+**
+** test_different_lock_flags():
+** Tests opening a file multiple times with different lock
+** flags.
+**
+*****************************************************************/
+static int
+test_different_lock_flags(hid_t in_fapl)
+{
+ hid_t fid1 = H5I_INVALID_HID; /* File ID */
+ hid_t fid2 = H5I_INVALID_HID; /* File ID */
+ hid_t fid3 = H5I_INVALID_HID; /* File ID */
+ hid_t fapl_id = H5I_INVALID_HID; /* File access property list */
+ char filename[NAME_BUF_SIZE]; /* File name */
+
+ TESTING("Using different lock flags")
+
+ /* Copy the incoming fapl */
+ if ((fapl_id = H5Pcopy(in_fapl)) < 0)
+ TEST_ERROR
+
+ /* Set locking in the fapl */
+ if (H5Pset_file_locking(fapl_id, TRUE, TRUE) < 0)
+ TEST_ERROR
+
+ /* Set the filename to use for this test (dependent on fapl) */
+ h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
+
+ /* Create the test file */
+ if ((fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ TEST_ERROR
+
+ /* Open the test file with the same flags (should pass) */
+ if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ TEST_ERROR
+
+ /* Unset locking in the fapl */
+ if (H5Pset_file_locking(fapl_id, FALSE, FALSE) < 0)
+ TEST_ERROR
+
+ /* Open the test file with different flags (should FAIL) */
+ H5E_BEGIN_TRY
+ {
+ fid3 = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
+ }
+ H5E_END_TRY;
+ if (H5I_INVALID_HID != fid3)
+ FAIL_PUTS_ERROR("Should not have been able to open a file with different locking flags")
+
+ /* Close the files */
+ if (H5Fclose(fid1) < 0)
+ TEST_ERROR
+ if (H5Fclose(fid2) < 0)
+ TEST_ERROR
+
+ /* Close the copied property list */
+ if (H5Pclose(fapl_id) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl_id);
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+ H5Fclose(fid3);
+ }
+ H5E_END_TRY;
+
+ return -1;
+} /* end test_different_lock_flags() */
static int
test_swmr_vfd_flag(void)
@@ -6414,10 +6560,18 @@ error:
static int
test_bug_refresh(hid_t in_fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl = H5I_INVALID_HID;
H5F_t *f;
- hid_t gid1, gid2, gid3, gid4, gid5, gid6, gid7, gid8, gid9;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t gid3 = H5I_INVALID_HID;
+ hid_t gid4 = H5I_INVALID_HID;
+ hid_t gid5 = H5I_INVALID_HID;
+ hid_t gid6 = H5I_INVALID_HID;
+ hid_t gid7 = H5I_INVALID_HID;
+ hid_t gid8 = H5I_INVALID_HID;
+ hid_t gid9 = H5I_INVALID_HID;
char filename[NAME_BUF_SIZE]; /* File name */
/* Create a copy of the input parameter in_fapl */
@@ -6545,17 +6699,24 @@ error:
* (7) Refresh the dataset
* (8) Verify the dataset's dimension and data are correct
*/
-#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
+#ifndef H5_HAVE_UNISTD_H
static int
-test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSED new_format)
+test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
{
+ if (new_format) {
+ TESTING("H5Drefresh()--concurrent access for latest format");
+ }
+ else {
+ TESTING("H5Drefresh()--concurrent access for non-latest-format");
+ }
+
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ HDputs(" Test skipped due to a lack of unistd.h functionality.");
return 0;
} /* test_refresh_concur() */
-#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
+#else /* H5_HAVE_UNISTD_H */
static int
test_refresh_concur(hid_t in_fapl, hbool_t new_format)
@@ -6855,7 +7016,7 @@ error:
return -1;
} /* test_refresh_concur() */
-#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
+#endif /* H5_HAVE_UNISTD_H */
/*
* test_multiple_same():
@@ -7184,7 +7345,7 @@ error:
}
H5E_END_TRY;
- return -1;
+ return 1;
} /* test_multiple_same() */
@@ -7196,11 +7357,12 @@ error:
int
main(void)
{
- int nerrors = 0; /* The # of errors */
- hid_t fapl = -1; /* File access property list ID */
- char * driver = NULL; /* VFD string (from env variable) */
- char * lock_env_var = NULL; /* file locking env var pointer */
- hbool_t use_file_locking; /* read from env var */
+ int nerrors = 0; /* The # of errors */
+ hid_t fapl = -1; /* File access property list ID */
+ char * driver = NULL; /* VFD string (from env variable) */
+ char * lock_env_var = NULL; /* file locking env var pointer */
+ hbool_t use_file_locking; /* read from env var */
+ hbool_t file_locking_enabled = FALSE; /* Checks if the file system supports locks */
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -7221,6 +7383,13 @@ main(void)
else
use_file_locking = TRUE;
+ /* Check if file locking is enabled on this file system */
+ if (use_file_locking)
+ if (h5_check_if_file_locking_enabled(&file_locking_enabled) < 0) {
+ HDprintf("Error when determining if file locks are enabled\n");
+ return EXIT_FAILURE;
+ }
+
/* Set up */
h5_reset();
@@ -7262,7 +7431,7 @@ main(void)
nerrors += test_append_flush_dataset_fixed(fapl);
nerrors += test_append_flush_dataset_multiple(fapl);
- if (use_file_locking) {
+ if (use_file_locking && file_locking_enabled) {
/*
* Tests for:
* file open flags--single process access
@@ -7289,10 +7458,19 @@ main(void)
if (NULL == driver || !HDstrcmp(driver, "") || !HDstrcmp(driver, "sec2"))
nerrors += test_swmr_vfd_flag();
- /* This test changes the HDF5_USE_FILE_LOCKING environment variable
- * so it should be run last.
+ /* Test multiple opens via different locking flags */
+ if (use_file_locking && file_locking_enabled)
+ nerrors += test_different_lock_flags(fapl);
+
+ /* These tests change the HDF5_USE_FILE_LOCKING environment variable
+ * so they should be run last.
*/
- nerrors += test_file_lock_env_var(fapl);
+ if (use_file_locking && file_locking_enabled) {
+ nerrors += test_file_locking(fapl, TRUE, TRUE);
+ nerrors += test_file_locking(fapl, TRUE, FALSE);
+ nerrors += test_file_locking(fapl, FALSE, TRUE);
+ nerrors += test_file_locking(fapl, FALSE, FALSE);
+ }
if (nerrors)
goto error;
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c
index f9c587d..d39a698 100644
--- a/test/swmr_addrem_writer.c
+++ b/test/swmr_addrem_writer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -86,26 +86,6 @@ open_skeleton(const char *filename, unsigned verbose)
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c
index 74b023f..4133696 100644
--- a/test/swmr_check_compat_vfd.c
+++ b/test/swmr_check_compat_vfd.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 2b1c5d0..2201427 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/swmr_common.h b/test/swmr_common.h
index ce29111..d0d829d 100644
--- a/test/swmr_common.h
+++ b/test/swmr_common.h
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef _SWMR_COMMON_H
-#define _SWMR_COMMON_H
+#ifndef SWMR_COMMON_H
+#define SWMR_COMMON_H
/***********/
/* Headers */
@@ -75,4 +75,4 @@ H5TEST_DLL int print_metadata_retries_info(hid_t fid);
}
#endif
-#endif /* _SWMR_COMMON_H */
+#endif /* SWMR_COMMON_H */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index eedbcbc..2bff12c 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -119,38 +119,10 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp
if (!HDstrcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_small_data_block_size(fapl, (hsize_t)(50 * CHUNK_SIZE * DTYPE_SIZE));
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
-#ifdef QAK
- H5Pset_link_phase_change(fcpl, 0, 0);
-#endif /* QAK */
-
/* Emit informational message */
if (verbose)
HDfprintf(stderr, "Creating file\n");
@@ -314,7 +286,7 @@ main(int argc, const char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") && HDstrcmp(index_type, "b2"))
+ if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index e80fa71..836e1cc 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 9017793..910bc74 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index 297ee85..e52f4e2 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -88,26 +88,6 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
return -1;
}
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index a42d61d..00eb2e0 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -113,7 +113,8 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
/* Emit informational message */
if (verbose)
- HDfprintf(stderr, "Symbol = '%s', location = %lld\n", symbol->name, (long long)start);
+ HDfprintf(stderr, "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX "\n", symbol->name,
+ (uintmax_t)start[0], (uintmax_t)start[1]);
/* Read record from dataset */
record->rec_id = (uint64_t)ULLONG_MAX;
@@ -124,8 +125,9 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
if (record->rec_id != start[1]) {
HDfprintf(stderr, "*** ERROR ***\n");
HDfprintf(stderr, "Incorrect record value!\n");
- HDfprintf(stderr, "Symbol = '%s', location = %lld, record->rec_id = %llu\n", symbol->name,
- (long long)start, (unsigned long long)record->rec_id);
+ HDfprintf(stderr,
+ "Symbol = '%s', location = %" PRIuMAX ",%" PRIuMAX ", record->rec_id = %" PRIu64 "\n",
+ symbol->name, (uintmax_t)start[0], (uintmax_t)start[1], record->rec_id);
return -1;
} /* end if */
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 2936180..a4fc93e 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -84,26 +84,6 @@ open_skeleton(const char *filename, unsigned verbose)
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index 029e1e2..2d25801 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -82,16 +82,6 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- if (verbose) {
- char verbose_name[1024];
-
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_start_write.log.%u", random_seed);
-
- H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
- } /* end if */
-#endif /* QAK */
-
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
@@ -395,7 +385,7 @@ main(int argc, const char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") && HDstrcmp(index_type, "b2"))
+ if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 119a703..de8b054 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -88,22 +88,6 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne
return -1;
}
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
if (use_log_vfd) {
char verbose_name[1024];
diff --git a/test/tarray.c b/test/tarray.c
index 3e4a9e3..8b518cf 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -157,8 +157,8 @@ test_array_atomic_1d(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -490,8 +490,8 @@ test_array_array_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims1; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -668,8 +668,8 @@ test_array_compound_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -889,8 +889,8 @@ test_array_compound_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -951,8 +951,9 @@ test_array_compound_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Nested array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1092,7 +1093,6 @@ test_array_free_custom(void *_mem, void *info)
HDfree(mem);
} /* end if */
- return;
} /* end test_array_free_custom() */
/*-------------------------------------------------------------------------
@@ -1210,8 +1210,8 @@ test_array_vlen_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1440,8 +1440,8 @@ test_array_vlen_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1472,8 +1472,8 @@ test_array_vlen_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2081,8 +2081,9 @@ test_compat(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2128,8 +2129,9 @@ test_compat(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2228,5 +2230,5 @@ test_array(void)
void
cleanup_array(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
} /* end cleanup_array() */
diff --git a/test/tattr.c b/test/tattr.c
index 961ec51..b602222 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -519,13 +519,13 @@ test_attr_basic_read(hid_t fapl)
static void
test_attr_flush(hid_t fapl)
{
- hid_t fil, /* File ID */
- att, /* Attribute ID */
- spc, /* Dataspace ID */
- set; /* Dataset ID */
- double wdata = 3.14159F; /* Data to write */
- double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ hid_t fil, /* File ID */
+ att, /* Attribute ID */
+ spc, /* Dataspace ID */
+ set; /* Dataset ID */
+ double wdata = 3.14159; /* Data to write */
+ double rdata; /* Data read in */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Attribute Flushing\n"));
@@ -545,8 +545,8 @@ test_attr_flush(hid_t fapl)
ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if (!H5_DBL_ABS_EQUAL(rdata, H5_DOUBLE(0.0)))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F);
+ if (!H5_DBL_ABS_EQUAL(rdata, 0.0))
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0);
ret = H5Fflush(fil, H5F_SCOPE_GLOBAL);
CHECK(ret, FAIL, "H5Fflush");
@@ -554,8 +554,8 @@ test_attr_flush(hid_t fapl)
ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if (!H5_DBL_ABS_EQUAL(rdata, H5_DOUBLE(0.0)))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F);
+ if (!H5_DBL_ABS_EQUAL(rdata, 0.0))
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0);
ret = H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
CHECK(ret, FAIL, "H5Awrite");
@@ -859,8 +859,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) || HDstrcmp(fieldname, ATTR4_FIELDNAME2) ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3)))
+ if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -907,7 +907,7 @@ test_attr_compound_read(hid_t fapl)
/* Verify values read in */
for (i = 0; i < ATTR4_DIM1; i++)
for (j = 0; j < ATTR4_DIM2; j++)
- if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct))) {
+ if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
__LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
@@ -920,7 +920,7 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME))
+ if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1279,7 +1279,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME))
+ if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
@@ -1287,7 +1287,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1337,7 +1337,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME))
+ if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
@@ -1345,7 +1345,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1399,7 +1399,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
@@ -1407,7 +1407,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1436,19 +1436,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME))
+ if (HDstrcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME))
+ if (HDstrcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME))
+ if (HDstrcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1590,7 +1590,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME))
+ if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1605,7 +1605,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1629,7 +1629,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2123,7 +2123,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
HDsprintf(attrname, "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname))
+ if (HDstrcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -4206,8 +4206,8 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
#else /* H5_NO_DEPRECATED_SYMBOLS */
/* Shut compiler up */
- fcpl = fcpl;
- fapl = fapl;
+ (void)fcpl;
+ (void)fapl;
/* Output message about test being skipped */
MESSAGE(5, ("Skipping Test On Deprecated Attribute Routines\n"));
@@ -5658,7 +5658,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5684,7 +5684,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5705,7 +5705,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5725,7 +5725,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5749,7 +5749,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -6778,13 +6778,6 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
char attrname[NAME_BUF_SIZE]; /* Object name */
H5A_info_t my_info; /* Local attribute info */
-#ifdef QAK
- HDfprintf(stderr, "attr_name = '%s'\n", attr_name);
- if (info)
- HDfprintf(stderr, "info->corder = %u\n", (unsigned)info->corder);
- HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
-#endif /* QAK */
-
/* Increment # of times the callback was called */
op_data->ncalled++;
@@ -6813,7 +6806,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
/* Verify name of link */
HDsprintf(attrname, "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname))
+ if (HDstrcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 62c0138..bfc8daf 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -29,6 +29,10 @@
#include "h5test.h"
+#ifdef H5_HAVE_WIN32_API
+#include <crtdbg.h>
+#endif
+
#define progname "tcheck_version"
/* prototypes */
@@ -108,12 +112,31 @@ abort_intercept(int H5_ATTR_UNUSED sig)
HDexit(6);
}
+#ifdef H5_HAVE_WIN32_API
+/* Turns off the modal dialog that is raised when the Windows CRT calls abort().
+ *
+ * Returning TRUE here lets Windows know that we've handled the abort() and that there
+ * is no need to alert the user with a modal dialog box.
+ */
+int
+handle_crt_abort(int reportType, char *message, int *returnValue)
+{
+ return TRUE;
+}
+#endif
+
int
main(int ac, char **av)
{
+#ifdef H5_HAVE_WIN32_API
+ (void)_CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, handle_crt_abort);
+#endif
parse(ac, av);
HDsignal(SIGABRT, &abort_intercept);
H5check_version(major, minor, release);
HDsignal(SIGABRT, SIG_DFL);
+#ifdef H5_HAVE_WIN32_API
+ (void)_CrtSetReportHook2(_CRT_RPTHOOK_REMOVE, handle_crt_abort);
+#endif
return 0;
}
diff --git a/test/tchecksum.c b/test/tchecksum.c
index 79da14e..f96d810 100644
--- a/test/tchecksum.c
+++ b/test/tchecksum.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -15,7 +15,7 @@
*
* Created: tchecksum.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Test internal checksum routine(s)
*
diff --git a/test/tconfig.c b/test/tconfig.c
index 196ccce..e3c6a2c 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/tcoords.c b/test/tcoords.c
index e92bdde..fef8689 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -87,10 +87,10 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- memset(dset_name, 0, (size_t)NAME_LEN);
- strcat(dset_name, SINGLE_END_DSET);
+ HDmemset(dset_name, 0, (size_t)NAME_LEN);
+ HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -259,10 +259,10 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
hsize_t mem3_block[4] = {1, 3, 6, 1};
/* Construct dataset's name */
- memset(dset_name, 0, NAME_LEN);
- strcat(dset_name, SINGLE_END_DSET);
+ HDmemset(dset_name, 0, NAME_LEN);
+ HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -436,10 +436,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- memset(dset_name, 0, NAME_LEN);
- strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ HDmemset(dset_name, 0, NAME_LEN);
+ HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -687,5 +687,5 @@ test_coords(void)
void
cleanup_coords(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/test_filter_plugin.sh.in b/test/test_filter_plugin.sh.in
index 0a45c0f..78cdb3a 100644
--- a/test/test_filter_plugin.sh.in
+++ b/test/test_filter_plugin.sh.in
@@ -1,12 +1,12 @@
#! /bin/sh
#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
+# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/test_mirror.sh.in b/test/test_mirror.sh.in
new file mode 100644
index 0000000..b3e75c6
--- /dev/null
+++ b/test/test_mirror.sh.in
@@ -0,0 +1,100 @@
+#! /bin/bash
+#
+# 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://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tests for the Mirror VFD feature.
+#
+# Created:
+# Jacob Smith, 2019-12-30
+
+###############################################################################
+## test parameters
+###############################################################################
+
+nerrors=0
+
+SERVER_VERBOSITY="--verbosity=1"
+SERVER_PORT="--port=3000"
+
+
+###############################################################################
+## Main
+###############################################################################
+
+## TODO: arguments for main port, port range, verbosity?
+# Parse options (none accepted at this time)
+while [ $# -gt 0 ]; do
+ case "$1" in
+ *) # unknown option
+ echo "$0: Unknown option ($1)"
+ exit 1
+ ;;
+ esac
+done
+
+
+
+RUN_DIR=mirror_vfd_test
+MIRROR_UTILS=../utils/mirror_vfd # TODO: presupposes from test/
+
+mkdir $RUN_DIR
+
+# Copy program files into dedicated test directory
+for FILE in $MIRROR_UTILS/mirror_* ; do
+ case "$FILE" in
+ *.o) continue ;; # Don't copy .o files
+ esac
+ cp $FILE $RUN_DIR
+done
+cp mirror_vfd $RUN_DIR
+
+# With the --disable-shared option, program files are built in their main
+# directories; otherwise they are built in dir/.libs with a corresponding
+# wrapper script. Copy these libs builds if appropriate.
+if [ -f $MIRROR_UTILS/.libs/mirror_server ] ; then
+ RUN_LIBS=$RUN_DIR/.libs
+ mkdir $RUN_LIBS
+ for FILE in $MIRROR_UTILS/.libs/mirror_* ; do
+ case "$FILE" in
+ *.o) continue ;; # Don't copy .o files
+ esac
+ cp $FILE $RUN_LIBS
+ done
+ cp .libs/mirror_vfd $RUN_LIBS
+fi
+
+cd $RUN_DIR
+
+echo "Launching Mirror Server"
+SERVER_ARGS="$SERVER_PORT $SERVER_VERBOSITY"
+./mirror_server $SERVER_ARGS &
+
+./mirror_vfd
+nerrors=$?
+
+echo "Stopping Mirror Server"
+./mirror_server_stop $SERVER_PORT
+
+###############################################################################
+## Report and exit
+###############################################################################
+cd ..
+if test $nerrors -eq 0 ; then
+ echo "Mirror VFD tests passed."
+ if test -z "$HDF5_NOCLEANUP" ; then
+ rm -rf $RUN_DIR
+ fi
+ exit 0
+else
+ echo "Mirror VFD tests FAILED."
+ exit 1
+fi
+
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index 49868ca..bb53697 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -6,7 +6,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/test_vol_plugin.sh.in b/test/test_vol_plugin.sh.in
index 38220ef..d31646b 100644
--- a/test/test_vol_plugin.sh.in
+++ b/test/test_vol_plugin.sh.in
@@ -1,12 +1,12 @@
#! /bin/sh
#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
+# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/testabort_fail.sh.in b/test/testabort_fail.sh.in
index 925d8a4..a866f9e 100644
--- a/test/testabort_fail.sh.in
+++ b/test/testabort_fail.sh.in
@@ -7,14 +7,14 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Test to verify that the assertion/abort failure is fixed when the application
# does not close the file. (See HDFFV-10160)
#
-# Test to verify that the infinite loop closing library/abort failure is fixed
+# Test to verify that the infinite loop closing library/abort failure is fixed
# when the application creates and removes dense attributes (See HDFFV-10659)
srcdir=@srcdir@
@@ -33,7 +33,7 @@ TEST_NAME=filenotclosed # The test name
TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
#
# Run the test
-$RUNSERIAL $TEST_BIN >/dev/null 2>&1
+$RUNSERIAL $TEST_BIN >/dev/null 2>&1
exitcode=$?
if [ $exitcode -eq 0 ]; then
echo "Test PASSED"
@@ -47,7 +47,7 @@ echo "Testing infinite loop closing library/abort failure"
TEST_NAME=del_many_dense_attrs # The test name
TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
# Run the test
-$RUNSERIAL $TEST_BIN >/dev/null 2>&1
+$RUNSERIAL $TEST_BIN >/dev/null 2>&1
exitcode=$?
if [ $exitcode -eq 0 ]; then
echo "Test PASSED"
diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in
index a5641f5..43d1b46 100644
--- a/test/testcheck_version.sh.in
+++ b/test/testcheck_version.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -71,7 +71,7 @@ WarnMesg(){
test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings
echo "Bye..."
}
-
+
# Print warning message2 of version mismatch.
WarnMesg2(){
@@ -88,13 +88,13 @@ WarnMesg2(){
echo "Headers are $xxh5versmajor.$xxh5versminor.$xxh5versrelease, library is $h5versmajor.$h5versminor.$h5versrelease"
test -n "$H5_HAVE_EMBEDDED_LIBINFO" && cat $h5libsettings
}
-
+
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
# difference between the actual output and the expected output. The
# expected output generated according to the parameter values and compared
-# against actual output.
+# against actual output.
# The expected and actual output files are removed unless $HDF5_NOCLEANUP
# has a non-zero value.
# $1: the set value of $HDF5_DISABLE_VERSION_CHECK. (unset means not to set
@@ -175,7 +175,7 @@ TESTING() {
) >$actual 2>$actual_err
ret_code=$?
cat $actual_err >> $actual
-
+
if [ $h5haveexitcode = 'yes' -a \( $expect_code -ne $ret_code \) ]; then
echo "*FAILED*"
echo " Expected exit code ($expect_code) differs from actual code ($ret_code)"
@@ -189,7 +189,7 @@ TESTING() {
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
- # Clean up output file.
+ # Clean up output file.
# Also clean the core file generated by H5check_version's abort.
if test -z "$HDF5_NOCLEANUP"; then
$RM $expect $actual $actual_err
@@ -211,14 +211,14 @@ nerrors=0
verbose=yes # default on
debugmode= # default off
H5_HAVE_EMBEDDED_LIBINFO=`grep '#define H5_HAVE_EMBEDDED_LIBINFO ' ../src/H5pubconf.h`
-h5libsettings=../src/libhdf5.settings
+h5libsettings=../src/libhdf5.settings
PURPOSE
# Figure out library version numbers from the header file.
-h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2`
-h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2`
-h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2`
+h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | awk '{print $3}'`
+h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | awk '{print $3}'`
+h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | awk '{print $3}'`
DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease
case "$h5versmajor$h5versminor$h5versrelease" in
[0-9]*) # good. noop.
diff --git a/test/testerror.sh.in b/test/testerror.sh.in
index ac2a109..4fb2a81 100644
--- a/test/testerror.sh.in
+++ b/test/testerror.sh.in
@@ -7,11 +7,11 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Tests for test_error and err_compat
+# Tests for test_error and err_compat
srcdir=@srcdir@
@@ -62,8 +62,14 @@ TEST() {
TESTING $TEST_ERR
(
# Skip the plugin for testing missing filter.
- $ENVCMD $RUNSERIAL $TEST_ERR_BIN
+ $ENVCMD $RUNSERIAL $TEST_ERR_BIN
) >$actual 2>$actual_err
+
+ # Check for core dump
+ if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
# Extract file name, line number, version and thread IDs because they may be different
sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
-e 's/line [0-9]*/line (number)/' \
@@ -73,7 +79,7 @@ TEST() {
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
$actual_err > $actual_ext
cat $actual_ext >> $actual
-
+
if $CMP $expect1 $actual; then
echo " PASSED"
elif $CMP $expect2 $actual; then
@@ -96,7 +102,7 @@ SKIP() {
TESTING $@
echo " -SKIP-"
}
-
+
##############################################################################
##############################################################################
### T H E T E S T S ###
diff --git a/test/testexternal_env.sh.in b/test/testexternal_env.sh.in
index 3cc140d..94fbb88 100644
--- a/test/testexternal_env.sh.in
+++ b/test/testexternal_env.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -34,9 +34,9 @@ ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & valu
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
- else
- nerrors="`expr $nerrors + 1`"
- echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
+ echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
+else
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
fi
exit $nerrors
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index fc99f77..2562800 100644
--- a/test/testfiles/err_compat_1
+++ b/test/testfiles/err_compat_1
@@ -22,7 +22,10 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
minor: Inappropriate type
********* Print error stack in customized way *********
- error #000: (file name) in H5Eget_auto(1 or 2)(): line (number)
+ error #000: (file name) in H5Dcreate2(): line (number)
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ error #001: (file name) in H5Eget_auto(1 or 2)(): line (number)
major: Error API
minor: Can't get value
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index 3cdf10f..83685e8 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -82,7 +82,7 @@ fi
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
-mkdir flushrefresh_test
+mkdir -p flushrefresh_test
cp flushrefresh flushrefresh_test
# With the --disable-shared option, flushrefresh is built in the test directory,
@@ -90,7 +90,7 @@ cp flushrefresh flushrefresh_test
# the test directory. test/flushrefresh should always be copied,
# .libs/flushrefresh should be copied only if it exists.
if [ -f .libs/flushrefresh ]; then
- mkdir flushrefresh_test/.libs
+ mkdir -p flushrefresh_test/.libs
for FILE in .libs/flushrefresh*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
@@ -156,6 +156,12 @@ until [ $verification_done -eq 1 ]; do
echo "all flush verification complete" > $endsignal
else
./flushrefresh $param1 $param2
+
+ # Check for core dump
+ if [ $? -gt 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
echo "verification flush process done" > $endsignal
fi
@@ -195,6 +201,12 @@ if [ $timedout -eq 0 ]; then
echo "all refresh verification complete" > $endsignal
else
./flushrefresh $param1
+
+ # Check for core dump
+ if [ $? -gt 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
echo "refresh verifiction process done" > $endsignal
fi
diff --git a/test/testframe.c b/test/testframe.c
index dbc174a..f805997 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, January 6, 2004
*
* Purpose: Provides support functions for the testing framework.
@@ -442,15 +442,15 @@ GetTestExpress(void)
/* set it here for now. Should be done in something like h5test_init(). */
if (TestExpress == -1) {
- env_val = getenv("HDF5TestExpress");
+ env_val = HDgetenv("HDF5TestExpress");
if (env_val == NULL)
SetTestExpress(1);
- else if (strcmp(env_val, "0") == 0)
+ else if (HDstrcmp(env_val, "0") == 0)
SetTestExpress(0);
- else if (strcmp(env_val, "1") == 0)
+ else if (HDstrcmp(env_val, "1") == 0)
SetTestExpress(1);
- else if (strcmp(env_val, "2") == 0)
+ else if (HDstrcmp(env_val, "2") == 0)
SetTestExpress(2);
else
SetTestExpress(3);
@@ -521,7 +521,7 @@ ParseTestVerbosity(char *argv)
else if (*argv == 'h')
SetTestVerbosity(VERBO_HI);
else
- SetTestVerbosity(atoi(argv));
+ SetTestVerbosity(HDatoi(argv));
}
/*
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 152719a..45c0f9f 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -45,7 +45,6 @@ main(int argc, char *argv[])
AddTest("config", test_configure, cleanup_configure, "Configure definitions", NULL);
AddTest("metadata", test_metadata, cleanup_metadata, "Encoding/decoding metadata", NULL);
AddTest("checksum", test_checksum, cleanup_checksum, "Checksum algorithm", NULL);
- AddTest("tst", test_tst, NULL, "Ternary Search Trees", NULL);
AddTest("heap", test_heap, NULL, "Memory Heaps", NULL);
AddTest("skiplist", test_skiplist, NULL, "Skip Lists", NULL);
AddTest("refstr", test_refstr, NULL, "Reference Counted Strings", NULL);
@@ -82,7 +81,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
+ if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP"))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 872e6b4..5fb01a8 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -203,7 +203,6 @@ extern "C" {
/* Prototypes for the test routines */
void test_metadata(void);
void test_checksum(void);
-void test_tst(void);
void test_heap(void);
void test_refstr(void);
void test_file(void);
diff --git a/test/testlibinfo.sh.in b/test/testlibinfo.sh.in
index 1dd744b..2a9a05c 100644
--- a/test/testlibinfo.sh.in
+++ b/test/testlibinfo.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -47,7 +47,7 @@ SKIP() {
LINEMSG $*
echo " -SKIP-"
}
-
+
# Function definitions
CHECK_LIBINFO(){
LINEMSG $1
@@ -80,9 +80,9 @@ if [ -n $Shared_Lib ]; then
shlib=$(grep dlname ../src/libhdf5.la | sed -e "s/dlname='//" -e "s/'//")
else
h5libdir=../src
-fi
+fi
-h5libsettings=../src/libhdf5.settings
+h5libsettings=../src/libhdf5.settings
# Part 1:
# Verify the HDF5 library does contains an exact copy of the content of the
diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in
index 3d6b3ce..09074c3 100644
--- a/test/testlinks_env.sh.in
+++ b/test/testlinks_env.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -34,8 +34,8 @@ echo "$ENVCMD $RUNSERIAL $TEST_BIN"
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test for HDF5_EXT_PREFIX PASSED"
- else
+ echo "Test for HDF5_EXT_PREFIX PASSED"
+else
nerrors="`expr $nerrors + 1`"
echo "***Error encountered for HDF5_EXT_PREFIX test***"
fi
diff --git a/test/testmeta.c b/test/testmeta.c
index fee1954..c59c6cb 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -83,7 +83,7 @@ main(void)
for (i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
- sprintf(name, "/ExtArray%06d", i);
+ HDsprintf(name, "/ExtArray%06d", i);
dataset_id =
H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
@@ -103,7 +103,7 @@ main(void)
/* Removed print statement as it would lock system resources on Windows */
/*
* HDprintf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
- * fflush(stdout);
+ * HDfflush(stdout);
*/
floatval = (float)j;
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index a41947e..2df23c6 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/testvds_env.sh.in b/test/testvds_env.sh.in
index e9a27da..39f13a5 100644
--- a/test/testvds_env.sh.in
+++ b/test/testvds_env.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
@@ -35,8 +35,8 @@ UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test prefix for HDF5_VDS_PREFIX PASSED"
- else
+ echo "Test prefix for HDF5_VDS_PREFIX PASSED"
+else
nerrors="`expr $nerrors + 1`"
echo "***Error encountered for HDF5_VDS_PREFIX test***"
fi
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index 28abcf5..9673aa3 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -7,7 +7,7 @@
# 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.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
diff --git a/test/tfile.c b/test/tfile.c
index 6b2f832..796a99b 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1666,6 +1666,29 @@ test_file_is_accessible(const char *env_h5_drvr)
is_hdf5 = H5Fis_accessible(filename, fapl_id);
VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+ /*****************************************/
+ /* Newly created file that is still open */
+ /*****************************************/
+
+ /* On Windows, file locking is mandatory so this check ensures that
+ * H5Fis_accessible() works on files that have an exclusive lock.
+ * Previous versions of this API call created an additional file handle
+ * and attempted to read through it, which will not work when locks
+ * are enforced by the OS.
+ */
+
+ /* Create a file and hold it open */
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
+
+ /* Verify that the file is an HDF5 file */
+ is_hdf5 = H5Fis_accessible(filename, fapl_id);
+ VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
/*******************************/
/* Non-default user block size */
/*******************************/
@@ -3134,7 +3157,6 @@ test_rw_noupdate(void)
** test_userblock_alignment() test, to handle common testing
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 10, 2009
**
*****************************************************************/
@@ -3196,7 +3218,6 @@ test_userblock_alignment_helper1(hid_t fcpl, hid_t fapl)
** test_userblock_alignment() test, to handle common testing
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 10, 2009
**
*****************************************************************/
@@ -3266,7 +3287,6 @@ test_userblock_alignment_helper2(hid_t fapl, hbool_t open_rw)
** object [allocation] alignment size set interact properly.
**
** Programmer: Quincey Koziol
-** koziol@hdfgroup.org
** Septmber 8, 2009
**
*****************************************************************/
@@ -3930,7 +3950,7 @@ test_filespace_info(const char *env_h5_drvr)
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4300,7 +4320,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
return 0;
@@ -5799,7 +5819,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
/* Get the internal file pointer if the create succeeds */
if (fid >= 0) {
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
}
/* Retrieve the low/high bounds */
@@ -5974,7 +5994,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* The file's superblock version */
super_vers = f->shared->sblock->super_vers;
@@ -6015,7 +6035,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
/* Get the internal file pointer if the open succeeds */
if (fid >= 0) {
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
}
/* Verify the file open succeeds or fails */
@@ -6193,7 +6213,7 @@ test_libver_bounds_obj(hid_t fapl)
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* Create a group in the file */
gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6301,7 +6321,7 @@ test_libver_bounds_dataset(hid_t fapl)
/* Get the internal dataset pointer */
dset = (H5D_t *)H5VL_object(did);
- CHECK(dset, NULL, "H5VL_object");
+ CHECK_PTR(dset, "H5VL_object");
/* Verify version for layout and fill value messages */
if (low == H5F_LIBVER_EARLIEST) {
@@ -6349,7 +6369,7 @@ test_libver_bounds_dataset(hid_t fapl)
/* Get the internal dataset pointer */
dset = (H5D_t *)H5VL_object(did);
- CHECK(dset, NULL, "H5VL_object");
+ CHECK_PTR(dset, "H5VL_object");
/* Verify layout message version and chunk indexing type */
VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_4, "H5O_layout_ver_bounds");
@@ -6411,7 +6431,7 @@ test_libver_bounds_dataset(hid_t fapl)
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* Create the chunked dataset */
did = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
@@ -6419,7 +6439,7 @@ test_libver_bounds_dataset(hid_t fapl)
/* Get the internal file pointer */
dset = (H5D_t *)H5VL_object(did);
- CHECK(dset, NULL, "H5VL_object");
+ CHECK_PTR(dset, "H5VL_object");
/* Verify the dataset's layout, fill value and filter pipeline message versions */
/* Also verify the chunk indexing type */
@@ -6540,7 +6560,7 @@ test_libver_bounds_dataspace(hid_t fapl)
sid = H5Dget_space(did);
CHECK(sid, H5I_INVALID_HID, "H5Dget_space");
space = (H5S_t *)H5I_object(sid);
- CHECK(space, NULL, "H5I_object");
+ CHECK_PTR(space, "H5I_object");
/* Verify the dataspace version */
VERIFY(space->extent.version, H5O_sdspace_ver_bounds[low], "H5O_sdspace_ver_bounds");
@@ -6557,7 +6577,7 @@ test_libver_bounds_dataspace(hid_t fapl)
sid_null = H5Dget_space(did_null);
CHECK(sid_null, H5I_INVALID_HID, "H5Dget_space");
space_null = (H5S_t *)H5I_object(sid_null);
- CHECK(space_null, NULL, "H5I_object");
+ CHECK_PTR(space_null, "H5I_object");
/* Verify the dataspace version */
VERIFY(space_null->extent.version, H5O_SDSPACE_VERSION_2, "H5O_sdspace_ver_bounds");
@@ -6635,7 +6655,7 @@ test_libver_bounds_dataspace(hid_t fapl)
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* Create the chunked dataset */
did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
@@ -6645,7 +6665,7 @@ test_libver_bounds_dataspace(hid_t fapl)
tmp_sid = H5Dget_space(did);
CHECK(tmp_sid, H5I_INVALID_HID, "H5Dget_space");
tmp_space = (H5S_t *)H5I_object(tmp_sid);
- CHECK(tmp_space, NULL, "H5I_object");
+ CHECK_PTR(tmp_space, "H5I_object");
/* Create the compact dataset */
did_compact = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid_compact, H5P_DEFAULT, dcpl_compact,
@@ -6656,7 +6676,7 @@ test_libver_bounds_dataspace(hid_t fapl)
tmp_sid_compact = H5Dget_space(did_compact);
CHECK(tmp_sid_compact, H5I_INVALID_HID, "H5Dget_space");
tmp_space_compact = (H5S_t *)H5I_object(tmp_sid_compact);
- CHECK(tmp_space_compact, NULL, "H5I_object");
+ CHECK_PTR(tmp_space_compact, "H5I_object");
/* Create the contiguous dataset */
did_contig =
@@ -6667,7 +6687,7 @@ test_libver_bounds_dataspace(hid_t fapl)
tmp_sid_contig = H5Dget_space(did_contig);
CHECK(tmp_sid_contig, H5I_INVALID_HID, "H5Dget_space");
tmp_space_contig = (H5S_t *)H5I_object(tmp_sid_contig);
- CHECK(tmp_space_contig, NULL, "H5I_object");
+ CHECK_PTR(tmp_space_contig, "H5I_object");
/* Verify versions for the three dataspaces */
VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
@@ -6891,7 +6911,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
/* Get the internal datatype pointer */
dtype = (H5T_t *)H5I_object(dtid);
- CHECK(dtype, NULL, "H5I_object");
+ CHECK_PTR(dtype, "H5I_object");
/* Verify the datatype message version */
/* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
@@ -6965,13 +6985,13 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* Open the committed datatype */
str_tid = H5Topen2(fid, "datatype", H5P_DEFAULT);
CHECK(str_tid, FAIL, "H5Topen2");
str_dtype = (H5T_t *)H5VL_object(str_tid);
- CHECK(str_dtype, NULL, "H5VL_object");
+ CHECK_PTR(str_dtype, "H5VL_object");
/* Verify the committed datatype message version */
VERIFY(str_dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST],
@@ -6991,7 +7011,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
/* Get the internal datatype pointer */
dtype = (H5T_t *)H5I_object(dtid);
- CHECK(dtype, NULL, "H5I_object");
+ CHECK_PTR(dtype, "H5I_object");
/* Verify the dataset's datatype message version */
/* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
@@ -7124,7 +7144,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get the internal attribute pointer */
attr = (H5A_t *)H5VL_object(aid);
- CHECK(attr, NULL, "H5VL_object");
+ CHECK_PTR(attr, "H5VL_object");
/* Verify the attribute version */
if (low == H5F_LIBVER_EARLIEST)
@@ -7143,7 +7163,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get the internal attribute pointer */
attr = (H5A_t *)H5VL_object(aid);
- CHECK(attr, NULL, "H5VL_object");
+ CHECK_PTR(attr, "H5VL_object");
/* Verify attribute version */
VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
@@ -7164,7 +7184,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get internal attribute pointer */
attr = (H5A_t *)H5VL_object(aid);
- CHECK(attr, NULL, "H5VL_object");
+ CHECK_PTR(attr, "H5VL_object");
/* Verify attribute version */
if (low == H5F_LIBVER_EARLIEST)
@@ -7229,7 +7249,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get the internal attribute pointer */
attr = (H5A_t *)H5VL_object(aid);
- CHECK(attr, NULL, "H5VL_object");
+ CHECK_PTR(attr, "H5VL_object");
/* Verify the attribute version */
if (low == H5F_LIBVER_EARLIEST)
@@ -7291,7 +7311,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get the internal file pointer */
f = (H5F_t *)H5VL_object(fid);
- CHECK(f, NULL, "H5VL_object");
+ CHECK_PTR(f, "H5VL_object");
/* Open the group */
gid = H5Gopen2(fid, GRP_NAME, H5P_DEFAULT);
@@ -7303,7 +7323,7 @@ test_libver_bounds_attributes(hid_t fapl)
/* Get the internal attribute pointer */
attr = (H5A_t *)H5VL_object(aid);
- CHECK(attr, NULL, "H5VL_object");
+ CHECK_PTR(attr, "H5VL_object");
/* Verify the attribute message version */
VERIFY(attr->shared->version, H5O_attr_ver_bounds[f->shared->low_bound],
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 910153c..55e5a9b 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -55,7 +55,7 @@ char prop3_def[10] = "Ten chars"; /* Property 3 default value */
#define PROP3_DEF_VALUE (&prop3_def)
#define PROP4_NAME "Property 4"
-double prop4_def = 1.41F; /* Property 4 default value */
+double prop4_def = 1.41; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
@@ -2172,5 +2172,5 @@ test_genprop(void)
void
cleanup_genprop(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/th5o.c b/test/th5o.c
index 92dc0af..ebb6c6e 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -247,7 +247,7 @@ test_h5o_open_by_addr(void)
{
hid_t fid; /* HDF5 File ID */
hid_t grp, dset, dtype, dspace; /* Object identifiers */
- H5L_info2_t li; /* Buffer for H5Lget_info */
+ H5L_info2_t li; /* Buffer for H5Lget_info2 */
haddr_t grp_addr; /* Addresses for objects */
haddr_t dset_addr;
haddr_t dtype_addr;
@@ -1806,5 +1806,5 @@ test_h5o(void)
void
cleanup_h5o(void)
{
- remove(TEST_FILENAME);
+ HDremove(TEST_FILENAME);
}
diff --git a/test/th5s.c b/test/th5s.c
index a43afb0..51216dc 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1246,7 +1246,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
if (sbuf_size > 0) {
sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK(sbuf, NULL, "HDcalloc");
+ CHECK_PTR(sbuf, "HDcalloc");
}
/* Try decoding bogus buffer */
@@ -1308,7 +1308,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
if (null_size > 0) {
null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK(null_sbuf, NULL, "HDcalloc");
+ CHECK_PTR(null_sbuf, "HDcalloc");
}
/* Encode the null dataspace in the buffer */
@@ -1344,7 +1344,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
if (scalar_size > 0) {
scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK(scalar_buf, NULL, "HDcalloc");
+ CHECK_PTR(scalar_buf, "HDcalloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1438,7 +1438,7 @@ test_h5s_encode1(void)
if (sbuf_size > 0) {
sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK(sbuf, NULL, "HDcalloc");
+ CHECK_PTR(sbuf, "HDcalloc");
}
/* Try decoding bogus buffer */
@@ -1500,7 +1500,7 @@ test_h5s_encode1(void)
if (null_size > 0) {
null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size);
- CHECK(null_sbuf, NULL, "HDcalloc");
+ CHECK_PTR(null_sbuf, "HDcalloc");
}
/* Encode the null dataspace in the buffer */
@@ -1536,7 +1536,7 @@ test_h5s_encode1(void)
if (scalar_size > 0) {
scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size);
- CHECK(scalar_buf, NULL, "HDcalloc");
+ CHECK_PTR(scalar_buf, "HDcalloc");
}
/* Encode the scalar dataspace in the buffer */
@@ -1623,7 +1623,7 @@ test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid, uint32_t expected_version,
/* Allocate the buffer for encoding */
buf = (char *)HDmalloc(buf_size);
- CHECK(buf, NULL, "H5Dmalloc");
+ CHECK_PTR(buf, "H5Dmalloc");
/* Encode according to the setting in in_fapl */
ret = H5Sencode2(in_sid, buf, &buf_size, in_fapl);
@@ -1984,7 +1984,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
break;
default:
- assert(0);
+ HDassert(0);
break;
}
@@ -2149,7 +2149,7 @@ test_h5s_encode_length(void)
/* Allocate the buffer */
if (sbuf_size > 0) {
sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size);
- CHECK(sbuf, NULL, "H5Sencode2");
+ CHECK_PTR(sbuf, "H5Sencode2");
}
/* Encode the dataspace */
@@ -2449,7 +2449,7 @@ test_h5s_compound_scalar_read(void)
ret = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
- if (HDmemcmp(&space4_data, &rdata, sizeof(struct space4_struct))) {
+ if (HDmemcmp(&space4_data, &rdata, sizeof(struct space4_struct)) != 0) {
HDprintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n", space4_data.c1, rdata.c1);
HDprintf("scalar data different: space4_data.u=%u, read_data4.u=%u\n", space4_data.u, rdata.u);
HDprintf("scalar data different: space4_data.f=%f, read_data4.f=%f\n", (double)space4_data.f,
@@ -2473,11 +2473,11 @@ test_h5s_compound_scalar_read(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_compound_scalar_read() */
+} /* end test_h5s_compound_scalar_read() */
-/* Data arrays for chunk test */
-double chunk_data_dbl[50000][3];
-float chunk_data_flt[50000][3];
+/* Data array sizes for chunk test */
+#define CHUNK_DATA_NX 50000
+#define CHUNK_DATA_NY 3
/****************************************************************
**
@@ -2489,13 +2489,32 @@ float chunk_data_flt[50000][3];
static void
test_h5s_chunk(void)
{
- herr_t status;
- hid_t fileID, dsetID;
- hid_t plist_id;
- hid_t space_id;
- hsize_t dims[2];
- hsize_t csize[2];
- int i, j;
+ herr_t status;
+ hid_t fileID, dsetID;
+ hid_t plist_id;
+ hid_t space_id;
+ hsize_t dims[2];
+ hsize_t csize[2];
+ double **chunk_data_dbl = NULL;
+ double * chunk_data_dbl_data = NULL;
+ float ** chunk_data_flt = NULL;
+ float * chunk_data_flt_data = NULL;
+ int i, j;
+
+ /* Allocate memory */
+ chunk_data_dbl_data = (double *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
+ CHECK_PTR(chunk_data_dbl_data, "HDcalloc");
+ chunk_data_dbl = (double **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
+ CHECK_PTR(chunk_data_dbl, "HDcalloc");
+ for (i = 0; i < CHUNK_DATA_NX; i++)
+ chunk_data_dbl[i] = chunk_data_dbl_data + (i * CHUNK_DATA_NY);
+
+ chunk_data_flt_data = (float *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
+ CHECK_PTR(chunk_data_flt_data, "HDcalloc");
+ chunk_data_flt = (float **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
+ CHECK_PTR(chunk_data_flt, "HDcalloc");
+ for (i = 0; i < CHUNK_DATA_NX; i++)
+ chunk_data_flt[i] = chunk_data_flt_data + (i * CHUNK_DATA_NY);
fileID = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fcreate");
@@ -2503,14 +2522,14 @@ test_h5s_chunk(void)
plist_id = H5Pcreate(H5P_DATASET_CREATE);
CHECK(plist_id, FAIL, "H5Pcreate");
- csize[0] = 50000;
- csize[1] = 3;
+ csize[0] = CHUNK_DATA_NX;
+ csize[1] = CHUNK_DATA_NY;
status = H5Pset_chunk(plist_id, 2, csize);
CHECK(status, FAIL, "H5Pset_chunk");
/* Create the dataspace */
- dims[0] = 50000;
- dims[1] = 3;
+ dims[0] = CHUNK_DATA_NX;
+ dims[1] = CHUNK_DATA_NY;
space_id = H5Screate_simple(2, dims, NULL);
CHECK(space_id, FAIL, "H5Screate_simple");
@@ -2518,11 +2537,11 @@ test_h5s_chunk(void)
CHECK(dsetID, FAIL, "H5Dcreate2");
/* Initialize float array */
- for (i = 0; i < 50000; i++)
- for (j = 0; j < 3; j++)
+ for (i = 0; i < CHUNK_DATA_NX; i++)
+ for (j = 0; j < CHUNK_DATA_NY; j++)
chunk_data_flt[i][j] = (float)(i + 1) * 2.5F - (float)j * 100.3F;
- status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
+ status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt_data);
CHECK(status, FAIL, "H5Dwrite");
status = H5Pclose(plist_id);
@@ -2535,17 +2554,17 @@ test_h5s_chunk(void)
CHECK(status, FAIL, "H5Fclose");
/* Reset/initialize the data arrays to read in */
- HDmemset(chunk_data_dbl, 0, sizeof(double) * 50000 * 3);
- HDmemset(chunk_data_flt, 0, sizeof(float) * 50000 * 3);
+ HDmemset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ HDmemset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
fileID = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fopen");
dsetID = H5Dopen2(fileID, "coords", H5P_DEFAULT);
CHECK(dsetID, FAIL, "H5Dopen2");
- status = H5Dread(dsetID, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_dbl);
+ status = H5Dread(dsetID, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_dbl_data);
CHECK(status, FAIL, "H5Dread");
- status = H5Dread(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
+ status = H5Dread(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt_data);
CHECK(status, FAIL, "H5Dread");
status = H5Dclose(dsetID);
@@ -2553,15 +2572,20 @@ test_h5s_chunk(void)
status = H5Fclose(fileID);
CHECK(status, FAIL, "H5Fclose");
- for (i = 0; i < 50000; i++) {
- for (j = 0; j < 3; j++) {
+ for (i = 0; i < CHUNK_DATA_NX; i++) {
+ for (j = 0; j < CHUNK_DATA_NY; j++) {
/* Check if the two values are within 0.001% range. */
- if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], (double)0.00001F))
+ if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], 0.00001))
TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n",
(unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j,
(double)chunk_data_flt[i][j]);
} /* end for */
} /* end for */
+
+ HDfree(chunk_data_dbl);
+ HDfree(chunk_data_dbl_data);
+ HDfree(chunk_data_flt);
+ HDfree(chunk_data_flt_data);
} /* test_h5s_chunk() */
/****************************************************************
@@ -3280,7 +3304,7 @@ test_versionbounds(void)
/* Its version should be H5O_SDSPACE_VERSION_1 */
spacep = (H5S_t *)H5I_object(space);
- CHECK(spacep, NULL, "H5I_object");
+ CHECK_PTR(spacep, "H5I_object");
VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound");
/* Set high bound to V18 */
@@ -3301,7 +3325,7 @@ test_versionbounds(void)
dset_space = H5Dget_space(dset);
CHECK(dset_space, FAIL, "H5Dget_space");
spacep = (H5S_t *)H5I_object(dset_space);
- CHECK(spacep, NULL, "H5I_object");
+ CHECK_PTR(spacep, "H5I_object");
/* Dataspace version should remain as H5O_SDSPACE_VERSION_1 */
VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound");
@@ -3338,7 +3362,7 @@ test_versionbounds(void)
dset_space = H5Dget_space(dset);
CHECK(dset_space, FAIL, "H5Dget_space");
spacep = (H5S_t *)H5I_object(dset_space);
- CHECK(spacep, NULL, "H5I_object");
+ CHECK_PTR(spacep, "H5I_object");
/* Verify the dataspace version */
VERIFY(spacep->extent.version, H5O_sdspace_ver_bounds[low], "upgraded dataspace version");
@@ -3427,9 +3451,9 @@ test_h5s(void)
void
cleanup_h5s(void)
{
- remove(DATAFILE);
- remove(NULLFILE);
- remove(BASICFILE);
- remove(ZEROFILE);
- remove(VERBFNAME);
+ HDremove(DATAFILE);
+ HDremove(NULLFILE);
+ HDremove(BASICFILE);
+ HDremove(ZEROFILE);
+ HDremove(VERBFNAME);
}
diff --git a/test/theap.c b/test/theap.c
index 73b8f5b..9d5787b 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1050,7 +1050,7 @@ test_heap_term(void)
HDfree(inc_sort_num);
if (dec_sort_num)
HDfree(dec_sort_num);
-} /* end test_tst_term() */
+} /* end test_heap_term() */
/****************************************************************
**
diff --git a/test/thread_id.c b/test/thread_id.c
new file mode 100644
index 0000000..c7b2b44
--- /dev/null
+++ b/test/thread_id.c
@@ -0,0 +1,324 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Check that a thread ID returned by H5TS_thread_id() possesses the
+ * following properties:
+ *
+ * 1 ID >= 1.
+ * 2 The ID is constant over the thread's lifetime.
+ * 3 No two threads share an ID during their lifetimes.
+ * 4 A thread's ID is available for reuse as soon as it is joined.
+ */
+
+/*
+ * Include required headers. This file tests internal library functions,
+ * so we include the private headers here.
+ */
+#include "testhdf5.h"
+
+#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
+
+static void my_errx(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
+
+static void
+my_errx(int code, const char *fmt, ...)
+{
+ va_list ap;
+
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfputc('\n', stderr);
+ HDexit(code);
+}
+
+#if defined(H5_HAVE_DARWIN)
+
+typedef struct _pthread_barrierattr {
+ uint8_t unused;
+} pthread_barrierattr_t;
+
+typedef struct _pthread_barrier {
+ uint32_t magic;
+ unsigned int count;
+ uint64_t nentered;
+ pthread_cond_t cv;
+ pthread_mutex_t mtx;
+} pthread_barrier_t;
+
+int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned int);
+int pthread_barrier_wait(pthread_barrier_t *);
+int pthread_barrier_destroy(pthread_barrier_t *);
+
+static const uint32_t barrier_magic = 0xf00dd00f;
+
+int
+pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count)
+{
+ int rc;
+
+ if (count == 0)
+ return EINVAL;
+
+ if (attr != NULL)
+ return EINVAL;
+
+ HDmemset(barrier, 0, sizeof(*barrier));
+
+ barrier->count = count;
+
+ if ((rc = pthread_cond_init(&barrier->cv, NULL)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_init(&barrier->mtx, NULL)) != 0) {
+ (void)pthread_cond_destroy(&barrier->cv);
+ return rc;
+ }
+
+ barrier->magic = barrier_magic;
+
+ return 0;
+}
+
+static void
+barrier_lock(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc));
+ }
+}
+
+static void
+barrier_unlock(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc));
+ }
+}
+
+int
+pthread_barrier_destroy(pthread_barrier_t *barrier)
+{
+ int rc;
+
+ barrier_lock(barrier);
+ if (barrier->magic != barrier_magic)
+ rc = EINVAL;
+ else if (barrier->nentered % barrier->count != 0)
+ rc = EBUSY;
+ else {
+ rc = 0;
+ barrier->magic = ~barrier->magic;
+ }
+ barrier_unlock(barrier);
+
+ if (rc != 0)
+ return rc;
+
+ (void)pthread_cond_destroy(&barrier->cv);
+ (void)pthread_mutex_destroy(&barrier->mtx);
+
+ return 0;
+}
+
+int
+pthread_barrier_wait(pthread_barrier_t *barrier)
+{
+ int rc;
+ uint64_t threshold;
+
+ if (barrier == NULL)
+ return EINVAL;
+
+ barrier_lock(barrier);
+ if (barrier->magic != barrier_magic) {
+ rc = EINVAL;
+ goto out;
+ }
+ /* Compute the release `threshold`. All threads entering with count = 5
+ * and `nentered` in [0, 4] should be released once `nentered` reaches 5:
+ * call 5 the release `threshold`. All threads entering with count = 5
+ * and `nentered` in [5, 9] should be released once `nentered` reaches 10.
+ */
+ threshold = (barrier->nentered / barrier->count + 1) * barrier->count;
+ barrier->nentered++;
+ while (barrier->nentered < threshold) {
+ if ((rc = pthread_cond_wait(&barrier->cv, &barrier->mtx)) != 0)
+ goto out;
+ }
+ rc = pthread_cond_broadcast(&barrier->cv);
+out:
+ barrier_unlock(barrier);
+ return rc;
+}
+
+#endif /* H5_HAVE_DARWIN */
+
+static void my_err(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
+
+static void
+my_err(int code, const char *fmt, ...)
+{
+ va_list ap;
+ int errno_copy = errno;
+
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ HDexit(code);
+}
+
+#define threads_failure(_call, _result) \
+ do { \
+ my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, HDstrerror(_result)); \
+ } while (false)
+
+#define NTHREADS 5
+
+static volatile bool failed = false;
+static pthread_barrier_t barrier;
+static bool used[NTHREADS];
+static pthread_mutex_t used_lock;
+
+static void
+atomic_printf(const char *fmt, ...)
+{
+ char buf[80];
+ va_list ap;
+ ssize_t nprinted, nwritten;
+
+ HDva_start(ap, fmt);
+ nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ HDva_end(ap);
+
+ if (nprinted == -1)
+ my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
+ else if (nprinted >= (ssize_t)sizeof(buf))
+ my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__);
+
+ nwritten = HDwrite(STDOUT_FILENO, buf, (size_t)nprinted);
+ if (nwritten < nprinted) {
+ my_errx(EXIT_FAILURE, "%s.%d: write error or short write", __func__, __LINE__);
+ }
+}
+
+/* Each thread runs this routine. The routine fetches the current
+ * thread's ID, makes sure that it is in the expected range, makes
+ * sure that in this round of testing, no two threads shared the
+ * same ID, and checks that each thread's ID is constant over its lifetime.
+ *
+ * main() checks that every ID in [1, NTHREADS] is used in each round
+ * of testing. All NTHREADS threads synchronize on a barrier after each
+ * has fetched its ID. The barrier guarantees that all threads' lifetimes
+ * overlap at least momentarily, so the IDs will be unique, and there
+ * will be NTHREADS of them. Further, since thread IDs are assigned
+ * starting with 1, and the number of threads with IDs alive never exceeds
+ * NTHREADS, the least ID has to be 1 and the greatest, NTHREADS.
+ */
+static void *
+thread_main(void H5_ATTR_UNUSED *arg)
+{
+ uint64_t ntid, tid;
+
+ tid = H5TS_thread_id();
+
+ if (tid < 1 || NTHREADS < tid) {
+ atomic_printf("unexpected tid %" PRIu64 " FAIL\n", tid);
+ goto pre_barrier_error;
+ }
+ pthread_mutex_lock(&used_lock);
+ if (used[tid - 1]) {
+ atomic_printf("reused tid %" PRIu64 " FAIL\n", tid);
+ pthread_mutex_unlock(&used_lock);
+ goto pre_barrier_error;
+ }
+ used[tid - 1] = true;
+ pthread_mutex_unlock(&used_lock);
+
+ atomic_printf("tid %" PRIu64 " in [1, %d] PASS\n", tid, NTHREADS);
+ pthread_barrier_wait(&barrier);
+
+ ntid = H5TS_thread_id();
+ if (ntid != tid) {
+ atomic_printf("tid changed from %" PRIu64 " to %" PRIu64 " FAIL\n", tid, ntid);
+ failed = true;
+ }
+ return NULL;
+pre_barrier_error:
+ pthread_barrier_wait(&barrier);
+ failed = true;
+ return NULL;
+}
+
+int
+main(void)
+{
+ int i, rc, times;
+ pthread_t threads[NTHREADS];
+
+ /* Run H5open() to initialize the library's thread-ID freelist,
+ * mutex, etc.
+ */
+ if (H5open() != SUCCEED)
+ my_errx(EXIT_FAILURE, "%s.%d: H5open failed", __func__, __LINE__);
+
+ if ((rc = pthread_mutex_init(&used_lock, NULL)) == -1)
+ threads_failure(pthread_mutex_init, rc);
+
+ if ((rc = pthread_barrier_init(&barrier, NULL, NTHREADS)) != 0)
+ threads_failure(pthread_barrier_init, rc);
+
+ /* Start the test threads and join them twice to make sure that
+ * the thread IDs are recycled in the second round.
+ */
+ for (times = 0; times < 2; times++) {
+
+ for (i = 0; i < NTHREADS; i++)
+ used[i] = false; // access synchronized by thread create/join
+
+ for (i = 0; i < NTHREADS; i++) {
+ rc = pthread_create(&threads[i], NULL, thread_main, NULL);
+ if (rc != 0)
+ threads_failure(pthread_create, rc);
+ }
+
+ for (i = 0; i < NTHREADS; i++) {
+ rc = pthread_join(threads[i], NULL);
+ if (rc != 0)
+ threads_failure(pthread_join, rc);
+ }
+
+ for (i = 0; i < NTHREADS; i++) {
+ if (!used[i]) // access synchronized by thread create/join
+ my_errx(EXIT_FAILURE, "thread ID %d did not run.", i + 1);
+ }
+ }
+ if ((rc = pthread_barrier_destroy(&barrier)) != 0)
+ threads_failure(pthread_barrier_destroy, rc);
+ return failed ? EXIT_FAILURE : EXIT_SUCCESS;
+}
+
+#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
+int
+main(void)
+{
+ HDfprintf(stderr, "not implemented in this configuration.\n");
+ return EXIT_SUCCESS;
+}
+#endif /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
diff --git a/test/tid.c b/test/tid.c
index db2b16f..2f5188e 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -19,6 +19,13 @@
#define H5I_FRIEND /*suppress error about including H5Ipkg */
#include "H5Ipkg.h"
+static herr_t
+free_wrapper(void *p)
+{
+ HDfree(p);
+ return SUCCEED;
+}
+
/* Test basic functionality of registering and deleting types and IDs */
static int
basic_id_test(void)
@@ -69,7 +76,7 @@ basic_id_test(void)
goto out;
/* Register a type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t)free);
+ myType = H5Iregister_type((size_t)64, 0, free_wrapper);
CHECK(myType, H5I_BADID, "H5Iregister_type");
if (myType == H5I_BADID)
@@ -163,7 +170,7 @@ basic_id_test(void)
H5E_END_TRY
/* Register another type and another object in that type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t)free);
+ myType = H5Iregister_type((size_t)64, 0, free_wrapper);
CHECK(myType, H5I_BADID, "H5Iregister_type");
if (myType == H5I_BADID)
@@ -238,7 +245,7 @@ out:
/* A dummy search function for the next test */
static int
-test_search_func(void H5_ATTR_UNUSED *ptr1, void H5_ATTR_UNUSED *ptr2)
+test_search_func(void H5_ATTR_UNUSED *ptr1, hid_t H5_ATTR_UNUSED id, void H5_ATTR_UNUSED *ptr2)
{
return 0;
}
@@ -268,7 +275,7 @@ id_predefined_test(void)
goto out;
H5E_BEGIN_TRY
- testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t)test_search_func, testObj);
+ testPtr = H5Isearch(H5I_GENPROP_LST, test_search_func, testObj);
H5E_END_TRY
CHECK_PTR_NULL(testPtr, "H5Isearch");
@@ -498,7 +505,7 @@ test_id_type_list(void)
H5I_type_t testType;
int i; /* Just a counter variable */
- startType = H5Iregister_type((size_t)8, 0, (H5I_free_t)free);
+ startType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(startType, H5I_BADID, "H5Iregister_type");
if (startType == H5I_BADID)
goto out;
@@ -506,12 +513,12 @@ test_id_type_list(void)
/* Sanity check */
if ((int)startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES) {
/* Error condition, throw an error */
- CHECK(1, 1, "H5Iregister_type");
+ ERROR("H5Iregister_type");
goto out;
}
/* Create types up to H5I_MAX_NUM_TYPES */
for (i = startType + 1; i < H5I_MAX_NUM_TYPES; i++) {
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t)free);
+ currentType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(currentType, H5I_BADID, "H5Iregister_type");
if (currentType == H5I_BADID)
goto out;
@@ -519,7 +526,7 @@ test_id_type_list(void)
/* Wrap around to low type ID numbers */
for (i = H5I_NTYPES; i < startType; i++) {
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t)free);
+ currentType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(currentType, H5I_BADID, "H5Iregister_type");
if (currentType == H5I_BADID)
goto out;
@@ -527,7 +534,7 @@ test_id_type_list(void)
/* There should be no room at the inn for a new ID type*/
H5E_BEGIN_TRY
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t)free);
+ testType = H5Iregister_type((size_t)8, 0, free_wrapper);
H5E_END_TRY
VERIFY(testType, H5I_BADID, "H5Iregister_type");
@@ -536,7 +543,7 @@ test_id_type_list(void)
/* Now delete a type and try to insert again */
H5Idestroy_type(H5I_NTYPES);
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t)free);
+ testType = H5Iregister_type((size_t)8, 0, free_wrapper);
VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
if (testType != H5I_NTYPES)
@@ -562,197 +569,301 @@ out:
/* There was a rare bug where, if an id free callback being called by
* H5I_clear_type() removed another id in that type, a segfault could occur.
* This test tests for that error (and freeing ids "out of order" within
- * H5Iclear_type() in general). */
+ * H5Iclear_type() in general).
+ *
+ * NB: RCT = "remove clear type"
+ */
+
/* Macro definitions */
-#define TEST_RCT_MAX_NOBJS 25
-#define TEST_RCT_MIN_NOBJS 5
-#define TEST_RCT_NITER 50
+#define RCT_MAX_NOBJS 25 /* Maximum number of objects in the list */
+#define RCT_MIN_NOBJS 5
+#define RCT_NITER 50 /* Number of times we cycle through object creation and deletion */
+
+/* Structure to hold the master list of objects */
+typedef struct rct_obj_list_t {
+
+ /* Pointer to the objects */
+ struct rct_obj_t *objects;
+
+ /* The number of objects in the list */
+ long count;
-/* Structure to hold the list of objects */
-typedef struct {
- struct test_rct_obj_t *list; /* List of objects */
- long nobjs; /* Number of objects in list */
- long nobjs_rem; /* Number of objects in list that have not been freed */
-} test_rct_list_t;
+ /* The number of objects in the list that have not been freed */
+ long remaining;
+} rct_obj_list_t;
/* Structure for an object */
-typedef struct test_rct_obj_t {
- hid_t id; /* ID for this object */
- int nfrees; /* Number of times this object has been freed */
- hbool_t freeing; /* Whether we are currently freeing this object directly (through H5Idec_ref()) */
- test_rct_list_t *obj_list; /* List of all objects */
-} test_rct_obj_t;
-
-/* Free callback */
+typedef struct rct_obj_t {
+ /* The ID for this object */
+ hid_t id;
+
+ /* The number of times this object has been freed */
+ int nfrees;
+
+ /* Whether we are currently freeing this object directly
+ * through H5Idec_ref().
+ */
+ hbool_t freeing;
+
+ /* Pointer to the master list of all objects */
+ rct_obj_list_t *list;
+} rct_obj_t;
+
+/* Free callback passed to H5Iclear_type()
+ *
+ * When invoked on a closing object, frees a random unfreed ID in the
+ * master list of objects.
+ */
static herr_t
-test_rct_free(void *_obj)
+rct_free_cb(void *_obj)
{
- test_rct_obj_t *obj = (test_rct_obj_t *)_obj;
- long rem_idx, i;
- herr_t ret; /* return value */
+ rct_obj_t *obj = (rct_obj_t *)_obj;
+ long remove_nth;
+ long i;
+ herr_t ret;
/* Mark this object as freed */
obj->nfrees++;
- obj->obj_list->nobjs_rem--;
-
- /* Check freeing and nobjs_rem */
- if (!obj->freeing && (obj->obj_list->nobjs_rem > 0)) {
- /* Remove a random object from the list */
- rem_idx = HDrandom() % obj->obj_list->nobjs_rem;
-
- /* Scan the list, finding the rem_idx'th object that has not been
- * freed */
- for (i = 0; i < obj->obj_list->nobjs; i++)
- if (obj->obj_list->list[i].nfrees == 0) {
- if (rem_idx == 0)
+
+ /* Decrement the number of objects in the list that have not been freed */
+ obj->list->remaining--;
+
+ /* If this object isn't already being freed by a callback free call and
+ * the master object list still contains objects to free, pick another
+ * object and free it.
+ */
+ if (!obj->freeing && (obj->list->remaining > 0)) {
+
+ /* Pick a random object from the list. This is done by picking a
+ * random number between 0 and the # of remaining unfreed objects
+ * and then scanning through the list to find that nth unfreed
+ * object.
+ */
+ remove_nth = HDrandom() % obj->list->remaining;
+ for (i = 0; i < obj->list->count; i++)
+ if (obj->list->objects[i].nfrees == 0) {
+ if (remove_nth == 0)
break;
else
- rem_idx--;
- } /* end if */
- if (i == obj->obj_list->nobjs) {
+ remove_nth--;
+ }
+
+ /* Badness if we scanned through the list and didn't manage to
+ * select one to delete (the list stats were probably updated
+ * incorrectly).
+ */
+ if (i == obj->list->count) {
ERROR("invalid obj_list");
- goto out;
- } /* end if */
- else {
- /* Remove the object. Mark as "freeing" so its own callback does
- * not free another object. */
- obj->obj_list->list[i].freeing = TRUE;
- ret = H5Idec_ref(obj->obj_list->list[i].id);
- CHECK(ret, FAIL, "H5Idec_ref");
- if (ret == FAIL)
- goto out;
- obj->obj_list->list[i].freeing = FALSE;
- } /* end else */
- } /* end if */
-
- /* Verify nobjs_rem is non-negative */
- if (obj->obj_list->nobjs_rem < 0) {
- ERROR("invalid nobjs_rem");
- goto out;
- } /* end if */
+ goto error;
+ }
+
+ /* Mark the object we're about to free so its own callback does
+ * not free another object. We don't want to recursively free the
+ * entire list when we free the first ID.
+ */
+ obj->list->objects[i].freeing = TRUE;
+
+ /* Decrement the reference count on the object */
+ ret = H5Idec_ref(obj->list->objects[i].id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (ret == FAIL)
+ goto error;
+
+ /* Unset the "freeing" flag */
+ obj->list->objects[i].freeing = FALSE;
+ }
+
+ /* Verify the number of objects remaining in the master list is non-negative */
+ if (obj->list->remaining < 0) {
+ ERROR("invalid number of objects remaining");
+ goto error;
+ }
return 0;
-out:
+error:
return -1;
-} /* end test_rct_free() */
+} /* end rct_free_cb() */
/* Test function */
static int
test_remove_clear_type(void)
{
- H5I_type_t obj_type;
- test_rct_list_t obj_list;
- test_rct_obj_t list[TEST_RCT_MAX_NOBJS];
- long i, j;
- long nobjs_found;
- hsize_t nmembers;
- herr_t ret; /* return value */
-
- /* Register type */
- obj_type = H5Iregister_type((size_t)8, 0, test_rct_free);
+ H5I_type_t obj_type;
+ rct_obj_list_t obj_list;
+ rct_obj_t * objects = NULL; /* Convenience pointer to objects stored in master list */
+ size_t list_size;
+ long i, j;
+ herr_t ret; /* return value */
+
+ /* Register a user-defined type with our custom ID-deleting callback */
+ obj_type = H5Iregister_type((size_t)8, 0, rct_free_cb);
CHECK(obj_type, H5I_BADID, "H5Iregister_type");
if (obj_type == H5I_BADID)
- goto out;
+ goto error;
+
+ /* Create an array to hold the objects in the master list */
+ list_size = RCT_MAX_NOBJS * sizeof(rct_obj_t);
+ obj_list.objects = HDmalloc(list_size);
+ CHECK_PTR(obj_list.objects, "HDcalloc");
+ if (NULL == obj_list.objects)
+ goto error;
+
+ /* Set a convenience pointer to the object array */
+ objects = obj_list.objects;
+
+ for (i = 0; i < RCT_NITER; i++) {
+
+ /* The number of members in the type, according to the HDF5 library */
+ hsize_t nmembers = 1234567; /* (init to fake number) */
+
+ /* The number of objects found while scanning through the object list */
+ int found;
- /* Init obj_list.list */
- obj_list.list = list;
-
- for (i = 0; i < TEST_RCT_NITER; i++) {
- /* Build object list */
- obj_list.nobjs = obj_list.nobjs_rem =
- TEST_RCT_MIN_NOBJS + (HDrandom() % (long)(TEST_RCT_MAX_NOBJS - TEST_RCT_MIN_NOBJS + 1));
- for (j = 0; j < obj_list.nobjs; j++) {
- list[j].nfrees = 0;
- list[j].freeing = FALSE;
- list[j].obj_list = &obj_list;
- list[j].id = H5Iregister(obj_type, &list[j]);
- CHECK(list[j].id, FAIL, "H5Iregister");
- if (list[j].id == FAIL)
- goto out;
+ /*********************
+ * Build object list *
+ *********************/
+
+ HDmemset(obj_list.objects, 0, list_size);
+
+ /* The number of objects used is a random number between the min and max */
+ obj_list.count = obj_list.remaining =
+ RCT_MIN_NOBJS + (HDrandom() % (long)(RCT_MAX_NOBJS - RCT_MIN_NOBJS + 1));
+
+ /* Create the actual objects */
+ for (j = 0; j < obj_list.count; j++) {
+
+ /* Object setup */
+ objects[j].nfrees = 0;
+ objects[j].freeing = FALSE;
+ objects[j].list = &obj_list;
+
+ /* Register an ID for it */
+ objects[j].id = H5Iregister(obj_type, &objects[j]);
+ CHECK(objects[j].id, FAIL, "H5Iregister");
+ if (objects[j].id == FAIL)
+ goto error;
+
+ /* Bump the reference count by 1 (to 2) 50% of the time */
if (HDrandom() % 2) {
- ret = H5Iinc_ref(list[j].id);
+ ret = H5Iinc_ref(objects[j].id);
CHECK(ret, FAIL, "H5Iinc_ref");
if (ret == FAIL)
- goto out;
- } /* end if */
- } /* end for */
+ goto error;
+ }
+ }
+
+ /******************************************
+ * Clear the type with force set to FALSE *
+ ******************************************/
- /* Clear the type */
+ /* Clear the type. Since force is FALSE, only
+ * IDs with a reference count of 1 will be cleared.
+ */
ret = H5Iclear_type(obj_type, FALSE);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
- goto out;
-
- /* Verify list */
- nobjs_found = 0;
- for (j = 0; j < obj_list.nobjs; j++) {
- if (list[j].nfrees == 0)
- nobjs_found++;
+ goto error;
+
+ /* Verify that the object struct fields are sane and count the
+ * number of unfreed objects
+ */
+ found = 0;
+ for (j = 0; j < obj_list.count; j++) {
+
+ if (objects[j].nfrees == 0) {
+ /* Count unfreed objects */
+ found++;
+ }
else {
- VERIFY(list[j].nfrees, (long)1, "list[j].nfrees");
- if (list[j].nfrees != (long)1)
- goto out;
- } /* end else */
- VERIFY(list[j].freeing, FALSE, "list[j].freeing");
- if (list[j].freeing != FALSE)
- goto out;
- } /* end for */
-
- /* Verify number of objects */
- VERIFY(obj_list.nobjs_rem, nobjs_found, "obj_list.nobjs_rem");
- if (obj_list.nobjs_rem != nobjs_found)
- goto out;
+ /* Every freed object should have been freed exactly once */
+ VERIFY(objects[j].nfrees, 1, "object freed more than once");
+ if (objects[j].nfrees != 1)
+ goto error;
+ }
+
+ /* No object should still be marked as "freeing" */
+ VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
+ if (objects[j].freeing != FALSE)
+ goto error;
+ }
+
+ /* Verify the number of unfreed objects we found during our scan
+ * matches the number stored in the list
+ */
+ VERIFY(obj_list.remaining, found, "incorrect number of objects remaining");
+ if (obj_list.remaining != found)
+ goto error;
+
+ /* Make sure the HDF5 library confirms our count */
ret = H5Inmembers(obj_type, &nmembers);
CHECK(ret, FAIL, "H5Inmembers");
if (ret == FAIL)
- goto out;
- VERIFY(nmembers, (size_t)nobjs_found, "H5Inmembers");
- if (nmembers != (size_t)nobjs_found)
- goto out;
+ goto error;
+ VERIFY(nmembers, found, "The number of members remaining in the type did not match our count");
+ if (nmembers != (hsize_t)found)
+ goto error;
+
+ /*****************************************
+ * Clear the type with force set to TRUE *
+ *****************************************/
- /* Clear the type with force set to TRUE */
+ /* Clear the type. Since force is TRUE, all IDs will be cleared. */
ret = H5Iclear_type(obj_type, TRUE);
CHECK(ret, FAIL, "H5Iclear_type");
if (ret == FAIL)
- goto out;
+ goto error;
- /* Verify list */
- for (j = 0; j < obj_list.nobjs; j++) {
- VERIFY(list[j].nfrees, (long)1, "list[j].nfrees");
- if (list[j].nfrees != (long)1)
- goto out;
- VERIFY(list[j].freeing, FALSE, "list[j].freeing");
- if (list[j].freeing != FALSE)
- goto out;
- } /* end for */
-
- /* Verify number of objects is 0 */
- VERIFY(obj_list.nobjs_rem, (long)0, "obj_list.nobjs_rem");
- if (obj_list.nobjs_rem != (long)0)
- goto out;
+ /* Verify that the object struct fields are sane */
+ for (j = 0; j < obj_list.count; j++) {
+
+ /* Every object should have been freed exactly once */
+ VERIFY(objects[j].nfrees, 1, "object freed more than once");
+ if (objects[j].nfrees != 1)
+ goto error;
+
+ /* No object should still be marked as "freeing" */
+ VERIFY(objects[j].freeing, FALSE, "object marked as freeing");
+ if (objects[j].freeing != FALSE)
+ goto error;
+ }
+
+ /* Verify the number of objects is 0 */
+ VERIFY(obj_list.remaining, 0, "objects remaining was not zero");
+ if (obj_list.remaining != 0)
+ goto error;
+
+ /* Make sure the HDF5 library confirms zero members in the type */
ret = H5Inmembers(obj_type, &nmembers);
CHECK(ret, FAIL, "H5Inmembers");
if (ret == FAIL)
- goto out;
- VERIFY(nmembers, (size_t)0, "H5Inmembers");
- if (nmembers != (size_t)0)
- goto out;
- } /* end for */
+ goto error;
+ VERIFY(nmembers, 0, "The number of members remaining in the type was not zero");
+ if (nmembers != 0)
+ goto error;
+ }
- /* Destroy type */
+ /* Destroy the type */
ret = H5Idestroy_type(obj_type);
CHECK(ret, FAIL, "H5Idestroy_type");
if (ret == FAIL)
- goto out;
+ goto error;
+
+ /* Free the object array */
+ HDfree(obj_list.objects);
return 0;
-out:
+error:
/* Cleanup. For simplicity, just destroy the types and ignore errors. */
H5E_BEGIN_TRY
- H5Idestroy_type(obj_type);
+ {
+ H5Idestroy_type(obj_type);
+ }
H5E_END_TRY
+
+ HDfree(obj_list.objects);
+
return -1;
} /* end test_remove_clear_type() */
diff --git a/test/timer.c b/test/timer.c
new file mode 100644
index 0000000..bb474ca
--- /dev/null
+++ b/test/timer.c
@@ -0,0 +1,402 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Dana Robinson
+ * May, 2011
+ *
+ * Purpose: Tests the operation of the platform-independent timers.
+ */
+
+#include "h5test.h"
+
+/*-------------------------------------------------------------------------
+ * Function: test_time_formatting
+ *
+ * Purpose: Tests time string creation.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * May 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_time_formatting(void)
+{
+ char *s = NULL;
+
+ TESTING("Time string formats");
+
+ /* < 0, N/A */
+ s = H5_timer_get_time_string(-1.0F);
+ if (NULL == s || HDstrcmp(s, "N/A") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* 0 0 */
+ s = H5_timer_get_time_string(0.0F);
+ if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 us nanoseconds */
+ s = H5_timer_get_time_string(123.0E-9F);
+ if (NULL == s || HDstrcmp(s, "123 ns") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 ms microseconds */
+ s = H5_timer_get_time_string(23.456E-6F);
+ if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 s milliseconds */
+ s = H5_timer_get_time_string(4.56789E-3F);
+ if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 min seconds */
+ s = H5_timer_get_time_string(3.14F);
+ if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 hr mins, secs */
+ s = H5_timer_get_time_string(2521.0F);
+ if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* < 1 d hrs, mins, secs */
+ s = H5_timer_get_time_string(9756.0F);
+ if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ /* > 1 d days, hrs, mins, secs */
+ s = H5_timer_get_time_string(280802.0F);
+ if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
+ TEST_ERROR;
+ HDfree(s);
+
+ PASSED();
+ return 0;
+
+error:
+ if (s)
+ HDfree(s);
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_timer_system_user
+ *
+ * Purpose: Tests the ability to get system and user times from the
+ * timers.
+ * Some platforms may require special code to get system and
+ * user times. If we do not support that particular platform
+ * dependent functionality, this test is skipped.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * May 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_timer_system_user(void)
+{
+ int i;
+ char * buf = NULL;
+ H5_timer_t timer;
+ H5_timevals_t times;
+ herr_t err;
+
+ TESTING("system/user times");
+
+ err = H5_timer_init(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ err = H5_timer_start(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ /* The system and user times may not be present on some systems. They
+ * will be -1.0 if they are not.
+ */
+ if (timer.initial.system < 0.0 || timer.initial.user < 0.0) {
+ SKIPPED();
+ HDprintf("NOTE: No suitable way to get system/user times on this platform.\n");
+ return 0;
+ }
+
+ /* Do some fake work */
+ for (i = 0; i < 1024; i++) {
+ buf = (char *)HDmalloc(1024 * (size_t)i);
+ HDfree(buf);
+ }
+
+ err = H5_timer_stop(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0)
+ TEST_ERROR;
+
+ /* System and user times should be non-negative. */
+ if (times.system < 0.0 || times.user < 0.0)
+ TEST_ERROR;
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_timer_elapsed
+ *
+ * Purpose: Tests the ability to get elapsed times from the timers.
+ * We should always be able to get an elapsed time,
+ * regardless of the time libraries or platform.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * May 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_timer_elapsed(void)
+{
+ int i;
+ char * buf = NULL;
+ H5_timer_t timer;
+ H5_timevals_t times;
+ herr_t err;
+
+ TESTING("elapsed times");
+
+ err = H5_timer_init(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ err = H5_timer_start(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ /* Do some fake work */
+ for (i = 0; i < 1024; i++) {
+ buf = (char *)HDmalloc(1024 * (size_t)i);
+ HDfree(buf);
+ }
+
+ err = H5_timer_stop(&timer);
+ if (err < 0)
+ TEST_ERROR;
+
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0)
+ TEST_ERROR;
+
+ /* Elapsed time should be non-negative. */
+ if (times.elapsed < 0.0)
+ TEST_ERROR;
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+static herr_t
+test_timer_functionality(void)
+{
+ int i;
+ char * buf = NULL;
+ H5_timer_t timer;
+
+ H5_timevals_t times;
+ double prev_etime;
+ double prev_total_etime;
+
+ herr_t err;
+
+ TESTING("timer functionality");
+
+ /*****************
+ * CHECK STARTUP *
+ *****************/
+
+ /* Timer should be running after start */
+ err = H5_timer_init(&timer);
+ if (err < 0 || timer.is_running)
+ TEST_ERROR;
+
+ /* Times should be initialized to zero */
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
+ TEST_ERROR;
+
+ err = H5_timer_get_total_times(timer, &times);
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
+ TEST_ERROR;
+
+ /********************
+ * CHECK START/STOP *
+ ********************/
+
+ /* Running state should change after start */
+ err = H5_timer_start(&timer);
+ if (err < 0 || !timer.is_running)
+ TEST_ERROR;
+
+ /* Do some fake work */
+ for (i = 0; i < 1024; i++) {
+ buf = (char *)HDmalloc(1024 * (size_t)i);
+ HDfree(buf);
+ }
+
+ /* Running state should change after stop */
+ err = H5_timer_stop(&timer);
+ if (err < 0 || timer.is_running)
+ TEST_ERROR;
+
+ /* Times should be positive and non-negative */
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0 || times.elapsed < 0.0)
+ TEST_ERROR;
+
+ err = H5_timer_get_total_times(timer, &times);
+ if (err < 0 || times.elapsed < 0.0)
+ TEST_ERROR;
+
+ /**********************
+ * CHECK INTERRUPTING *
+ **********************/
+
+ /* Timer should change stat and refresh to 0s */
+ err = H5_timer_init(&timer);
+ if (err < 0 || timer.is_running)
+ TEST_ERROR;
+
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
+ TEST_ERROR;
+
+ err = H5_timer_get_total_times(timer, &times);
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
+ TEST_ERROR;
+
+ /* Timer state should flip */
+ err = H5_timer_start(&timer);
+ if (err < 0 || !timer.is_running)
+ TEST_ERROR;
+
+ /* Do some fake work */
+ for (i = 0; i < 1024; i++) {
+ buf = (char *)HDmalloc(1024 * (size_t)i);
+ HDfree(buf);
+ }
+
+ /* Times should be non-negative */
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0 || times.elapsed < 0.0)
+ TEST_ERROR;
+ prev_etime = times.elapsed;
+
+ err = H5_timer_get_total_times(timer, &times);
+ if (err < 0 || times.elapsed < 0.0)
+ TEST_ERROR;
+ prev_total_etime = times.elapsed;
+
+ /* Do some fake work */
+ for (i = 0; i < 1024; i++) {
+ buf = (char *)HDmalloc(1024 * (size_t)i);
+ HDfree(buf);
+ }
+
+ /* State should flip on stop */
+ err = H5_timer_stop(&timer);
+ if (err < 0 || timer.is_running)
+ TEST_ERROR;
+
+ /* Times should be >= than the cached intermediate times */
+ err = H5_timer_get_times(timer, &times);
+ if (err < 0 || times.elapsed < prev_etime)
+ TEST_ERROR;
+
+ err = H5_timer_get_total_times(timer, &times);
+ if (err < 0 || times.elapsed < prev_total_etime)
+ TEST_ERROR;
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the basic functionality of the platform-independent
+ * timers
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Dana Robinson
+ * May, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ int nerrors = 0;
+
+ h5_reset();
+
+ HDprintf("Testing platform-independent timer functionality.\n");
+
+ nerrors += test_time_formatting() < 0 ? 1 : 0;
+ nerrors += test_timer_system_user() < 0 ? 1 : 0;
+ nerrors += test_timer_elapsed() < 0 ? 1 : 0;
+ nerrors += test_timer_functionality() < 0 ? 1 : 0;
+
+ if (nerrors) {
+ HDprintf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors,
+ nerrors > 1 ? "S" : "");
+ return 1;
+ }
+ else {
+ HDprintf("All platform-independent timer tests passed.\n");
+ return 0;
+ }
+}
diff --git a/test/titerate.c b/test/titerate.c
index aead4e2..3ec01ae 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -580,7 +580,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
H5O_info2_t oinfo;
herr_t ret; /* Generic return value */
- if (HDstrcmp(name, test_info->name)) {
+ if (HDstrcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -947,7 +947,7 @@ test_links(hid_t fapl)
else if (!HDstrcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
- CHECK(0, 0, "unknown object name");
+ ERROR("unknown object name");
} /* end for */
ret = H5Gclose(gid);
@@ -981,7 +981,7 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
+ if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1117,7 +1117,7 @@ test_links_deprec(hid_t fapl)
else if (!HDstrcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
- CHECK(0, 0, "unknown object name");
+ ERROR("unknown object name");
} /* end for */
ret = H5Gclose(gid);
diff --git a/test/tmeta.c b/test/tmeta.c
index 03ebf01..2609703 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/tmisc.c b/test/tmisc.c
index 88816f5..8c7a6c5 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -323,6 +323,13 @@ typedef struct {
/* and bad offset values are written to that file for testing */
#define MISC33_FILE "bad_offset.h5"
+/* Definitions for misc. test #35 */
+#define MISC35_SPACE_RANK 3
+#define MISC35_SPACE_DIM1 3
+#define MISC35_SPACE_DIM2 15
+#define MISC35_SPACE_DIM3 13
+#define MISC35_NPOINTS 10
+
/****************************************************************
**
** test_misc1(): test unlinking a dataset from a group and immediately
@@ -510,7 +517,6 @@ test_misc2_write_attribute(void)
HDfree(string_att1);
HDfree(string_att2);
- return;
}
static void
@@ -556,8 +562,6 @@ test_misc2_read_attribute(const char *filename, const char *att_name)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
}
/****************************************************************
**
@@ -2085,11 +2089,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]))
+ if (HDstrcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]))
+ if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2517,17 +2521,17 @@ test_misc13(void)
static void
test_misc14(void)
{
- hid_t file_id; /* File ID */
- hid_t fapl; /* File access property list ID */
- hid_t DataSpace; /* Dataspace ID */
- hid_t Dataset1; /* Dataset ID #1 */
- hid_t Dataset2; /* Dataset ID #2 */
- hid_t Dataset3; /* Dataset ID #3 */
- double data1 = 5.0F; /* Data to write for dataset #1 */
- double data2 = 10.0F; /* Data to write for dataset #2 */
- double data3 = 15.0F; /* Data to write for dataset #3 */
- double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ hid_t file_id; /* File ID */
+ hid_t fapl; /* File access property list ID */
+ hid_t DataSpace; /* Dataspace ID */
+ hid_t Dataset1; /* Dataset ID #1 */
+ hid_t Dataset2; /* Dataset ID #2 */
+ hid_t Dataset3; /* Dataset ID #3 */
+ double data1 = 5.0; /* Data to write for dataset #1 */
+ double data2 = 10.0; /* Data to write for dataset #2 */
+ double data3 = 15.0; /* Data to write for dataset #3 */
+ double rdata; /* Data read in */
+ herr_t ret; /* Generic return value */
/* Test creating two datasets and deleting the second */
@@ -2836,7 +2840,7 @@ test_misc16(void)
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -2921,7 +2925,7 @@ test_misc17(void)
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -3609,7 +3613,7 @@ test_misc19(void)
/* Get a VOL class to register */
vol_cls = h5_get_dummy_vol_class();
- CHECK(vol_cls, NULL, "h5_get_dummy_vol_class");
+ CHECK_PTR(vol_cls, "h5_get_dummy_vol_class");
/* Register a VOL connector */
volid = H5VLregister_connector(vol_cls, H5P_DEFAULT);
@@ -4084,9 +4088,31 @@ test_misc23(void)
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gcreate1");
- tmp_id = H5Gcreate1(file_id, "/A/grp", (size_t)0);
+ /* Make sure that size_hint values that can't fit into a 32-bit
+ * unsigned integer are rejected. Only necessary on systems where
+ * size_t is a 64-bit type.
+ */
+ if (SIZE_MAX > UINT32_MAX) {
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gcreate1(file_id, "/size_hint_too_large", SIZE_MAX);
+ }
+ H5E_END_TRY;
+ VERIFY(tmp_id, FAIL, "H5Gcreate1");
+ }
+
+ /* Make sure the largest size_hint value works */
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gcreate1(file_id, "/largest_size_hint", UINT32_MAX);
+ }
+ H5E_END_TRY;
CHECK(tmp_id, FAIL, "H5Gcreate1");
+ status = H5Gclose(tmp_id);
+ CHECK(status, FAIL, "H5Gclose");
+ tmp_id = H5Gcreate1(file_id, "/A/grp", (size_t)0);
+ CHECK(tmp_id, FAIL, "H5Gcreate1");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
@@ -4099,7 +4125,6 @@ test_misc23(void)
tmp_id = H5Dcreate1(file_id, "/A/dset", type_id, space_id, create_id);
CHECK(tmp_id, FAIL, "H5Dcreate1");
-
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -5780,6 +5805,108 @@ test_misc34(void)
/****************************************************************
**
+** test_misc35(): Check operation of free-list routines
+**
+****************************************************************/
+static void
+test_misc35(void)
+{
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[] = {MISC35_SPACE_DIM1, MISC35_SPACE_DIM2, MISC35_SPACE_DIM3}; /* Dataspace dims */
+ hsize_t coord[MISC35_NPOINTS][MISC35_SPACE_RANK] = /* Coordinates for point selection */
+ {{0, 10, 5}, {1, 2, 7}, {2, 4, 9}, {0, 6, 11}, {1, 8, 13},
+ {2, 12, 0}, {0, 14, 2}, {1, 0, 4}, {2, 1, 6}, {0, 3, 8}};
+ size_t reg_size_start; /* Initial amount of regular memory allocated */
+ size_t arr_size_start; /* Initial amount of array memory allocated */
+ size_t blk_size_start; /* Initial amount of block memory allocated */
+ size_t fac_size_start; /* Initial amount of factory memory allocated */
+ size_t reg_size_final; /* Final amount of regular memory allocated */
+ size_t arr_size_final; /* Final amount of array memory allocated */
+ size_t blk_size_final; /* Final amount of block memory allocated */
+ size_t fac_size_final; /* Final amount of factory memory allocated */
+ H5_alloc_stats_t alloc_stats; /* Memory stats */
+ herr_t ret; /* Return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Free-list API calls"));
+
+ /* Create dataspace */
+ /* (Allocates array free-list nodes) */
+ sid = H5Screate_simple(MISC35_SPACE_RANK, dims, NULL);
+ CHECK(sid, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Select sequence of ten points */
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)MISC35_NPOINTS, (const hsize_t *)coord);
+ CHECK(ret, FAIL, "H5Sselect_elements");
+
+ /* Close dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Retrieve initial free list values */
+ ret = H5get_free_list_sizes(&reg_size_start, &arr_size_start, &blk_size_start, &fac_size_start);
+ CHECK(ret, FAIL, "H5get_free_list_sizes");
+
+#if !defined H5_USING_MEMCHECKER
+ /* All the free list values should be >0 */
+ CHECK(reg_size_start, 0, "H5get_free_list_sizes");
+ CHECK(arr_size_start, 0, "H5get_free_list_sizes");
+ CHECK(blk_size_start, 0, "H5get_free_list_sizes");
+ CHECK(fac_size_start, 0, "H5get_free_list_sizes");
+#else /* H5_MEMORY_ALLOC_SANITY_CHECK */
+ /* All the values should be == 0 */
+ VERIFY(reg_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(arr_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(blk_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(fac_size_start, 0, "H5get_free_list_sizes");
+#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
+
+ /* Garbage collect the free lists */
+ ret = H5garbage_collect();
+ CHECK(ret, FAIL, "H5garbage_collect");
+
+ /* Retrieve free list values again */
+ ret = H5get_free_list_sizes(&reg_size_final, &arr_size_final, &blk_size_final, &fac_size_final);
+ CHECK(ret, FAIL, "H5get_free_list_sizes");
+
+ /* All the free list values should be <= previous values */
+ if (reg_size_final > reg_size_start)
+ ERROR("reg_size_final > reg_size_start");
+ if (arr_size_final > arr_size_start)
+ ERROR("arr_size_final > arr_size_start");
+ if (blk_size_final > blk_size_start)
+ ERROR("blk_size_final > blk_size_start");
+ if (fac_size_final > fac_size_start)
+ ERROR("fac_size_final > fac_size_start");
+
+ /* Retrieve memory allocation statistics */
+ ret = H5get_alloc_stats(&alloc_stats);
+ CHECK(ret, FAIL, "H5get_alloc_stats");
+
+#if defined H5_MEMORY_ALLOC_SANITY_CHECK
+ /* All the values should be >0 */
+ CHECK(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.peak_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.max_block_size, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats");
+#else /* H5_MEMORY_ALLOC_SANITY_CHECK */
+ /* All the values should be == 0 */
+ VERIFY(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.peak_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.max_block_size, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats");
+#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
+
+} /* end test_misc35() */
+
+/****************************************************************
+**
** test_misc(): Main misc. test routine.
**
****************************************************************/
@@ -5828,6 +5955,7 @@ test_misc(void)
test_misc32(); /* Test filter memory allocation functions */
test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */
test_misc34(); /* Test behavior of 0 and NULL in H5MM API calls */
+ test_misc35(); /* Test behavior of free-list & allocation statistics API calls */
} /* test_misc() */
diff --git a/test/trefer.c b/test/trefer.c
index 9056f8e..9b6c415 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -21,16 +21,18 @@
#include "testhdf5.h"
-#define FILE_REF_PARAM "trefer_param.h5"
-#define FILE_REF_OBJ "trefer_obj.h5"
-#define FILE_REF_REG "trefer_reg.h5"
-#define FILE_REF_REG_1D "trefer_reg_1d.h5"
-#define FILE_REF_OBJ_DEL "trefer_obj_del.h5"
-#define FILE_REF_GRP "trefer_grp.h5"
-#define FILE_REF_ATTR "trefer_attr.h5"
-#define FILE_REF_EXT1 "trefer_ext1.h5"
-#define FILE_REF_EXT2 "trefer_ext2.h5"
-#define FILE_REF_COMPAT "trefer_compat.h5"
+#define FILE_REF_PARAM "trefer_param.h5"
+#define FILE_REF_OBJ "trefer_obj.h5"
+#define FILE_REF_VL_OBJ "trefer_vl_obj.h5"
+#define FILE_REF_CMPND_OBJ "trefer_cmpnd_obj.h5"
+#define FILE_REF_REG "trefer_reg.h5"
+#define FILE_REF_REG_1D "trefer_reg_1d.h5"
+#define FILE_REF_OBJ_DEL "trefer_obj_del.h5"
+#define FILE_REF_GRP "trefer_grp.h5"
+#define FILE_REF_ATTR "trefer_attr.h5"
+#define FILE_REF_EXT1 "trefer_ext1.h5"
+#define FILE_REF_EXT2 "trefer_ext2.h5"
+#define FILE_REF_COMPAT "trefer_compat.h5"
/* 1-D dataset with fixed dimensions */
#define SPACE1_RANK 1
@@ -55,6 +57,15 @@ typedef struct s1_t {
float c;
} s1_t;
+/* Compound datatype with reference */
+typedef struct s2_t {
+ H5R_ref_t ref0; /* reference */
+ H5R_ref_t ref1; /* reference */
+ H5R_ref_t ref2; /* reference */
+ H5R_ref_t ref3; /* reference */
+ unsigned int dim_idx; /* dimension index of the dataset */
+} s2_t;
+
#define GROUPNAME "/group"
#define GROUPNAME2 "group2"
#define GROUPNAME3 "group3"
@@ -246,9 +257,9 @@ test_reference_params(void)
/* Test parameters to H5Ropen_object */
dset2 = H5Ropen_object(&rbuf[0], H5I_INVALID_HID, H5I_INVALID_HID);
- VERIFY(dset2, FAIL, "H5Ropen_object oapl_id");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object oapl_id");
dset2 = H5Ropen_object(NULL, H5P_DEFAULT, dapl_id);
- VERIFY(dset2, FAIL, "H5Ropen_object ref");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object ref");
/* Test parameters to H5Ropen_region */
ret_id = H5Ropen_region(NULL, H5I_INVALID_HID, H5I_INVALID_HID);
@@ -537,6 +548,561 @@ test_reference_obj(void)
/****************************************************************
**
+** test_reference_vlen_obj(): Test basic H5R (reference) object reference
+** within a vlen type.
+** Tests references to various kinds of objects
+**
+****************************************************************/
+static void
+test_reference_vlen_obj(void)
+{
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t group; /* Group ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t vl_dims[] = {1};
+ hid_t dapl_id; /* Dataset access property list */
+ H5R_ref_t *wbuf, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
+ unsigned * ibuf, *obuf;
+ unsigned i, j; /* Counters */
+ H5O_type_t obj_type; /* Object type */
+ herr_t ret; /* Generic return value */
+ hvl_t vl_wbuf = {0, NULL}, vl_rbuf = {0, NULL};
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Object Reference Functions within VLEN type\n"));
+
+ /* Allocate write & read buffers */
+ wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
+ ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ obuf[i] = i * 3;
+
+ /* Create file */
+ fid1 = H5Fcreate(FILE_REF_VL_OBJ, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create dataset access property list */
+ dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
+
+ /* Create a group */
+ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
+
+ /* Create a dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Create another dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, FAIL, "H5Dcreate2");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Create a datatype to refer to */
+ tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
+
+ /* Insert fields */
+ ret = H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ /* Save datatype for later */
+ ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit2");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Create vlen type */
+ tid1 = H5Tvlen_create(H5T_STD_REF);
+ CHECK(tid1, H5I_INVALID_HID, "H5Tvlen_create");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, vl_dims, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create a dataset */
+ dataset = H5Dcreate2(fid1, "Dataset3", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&wbuf[0], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset2", H5P_DEFAULT, &wbuf[1]);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&wbuf[1], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to group */
+ ret = H5Rcreate_object(fid1, "/Group1", H5P_DEFAULT, &wbuf[2]);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&wbuf[2], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
+
+ /* Create reference to named datatype */
+ ret = H5Rcreate_object(fid1, "/Group1/Datatype1", H5P_DEFAULT, &wbuf[3]);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&wbuf[3], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_NAMED_DATATYPE, "H5Rget_obj_type3");
+
+ /* Store references into vlen */
+ vl_wbuf.len = SPACE1_DIM1;
+ vl_wbuf.p = wbuf;
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vl_wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid1 = H5Fopen(FILE_REF_VL_OBJ, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
+
+ /* Open the dataset */
+ dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
+
+ tid1 = H5Dget_type(dataset);
+ CHECK(tid1, H5I_INVALID_HID, "H5Dget_type");
+
+ /* Read selection from disk */
+ ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &vl_rbuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ VERIFY(vl_rbuf.len, SPACE1_DIM1, "H5Dread");
+ rbuf = vl_rbuf.p;
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Open dataset object */
+ dset2 = H5Ropen_object(&rbuf[0], H5P_DEFAULT, dapl_id);
+ CHECK(dset2, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Check information in referenced dataset */
+ sid1 = H5Dget_space(dset2);
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
+
+ ret = (int)H5Sget_simple_extent_npoints(sid1);
+ VERIFY(ret, SPACE1_DIM1, "H5Sget_simple_extent_npoints");
+
+ /* Read from disk */
+ ret = H5Dread(dset2, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ VERIFY(ibuf[i], i * 3, "Data");
+
+ /* Close dereferenced Dataset */
+ ret = H5Dclose(dset2);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Open group object. GAPL isn't supported yet. But it's harmless to pass in */
+ group = H5Ropen_object(&rbuf[2], H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Open datatype object. TAPL isn't supported yet. But it's harmless to pass in */
+ tid1 = H5Ropen_object(&rbuf[3], H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tid1, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Verify correct datatype */
+ {
+ H5T_class_t tclass;
+
+ tclass = H5Tget_class(tid1);
+ VERIFY(tclass, H5T_COMPOUND, "H5Tget_class");
+
+ ret = H5Tget_nmembers(tid1);
+ VERIFY(ret, 3, "H5Tget_nmembers");
+ }
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close dataset access property list */
+ ret = H5Pclose(dapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Destroy references */
+ for (j = 0; j < SPACE1_DIM1; j++) {
+ ret = H5Rdestroy(&wbuf[j]);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&rbuf[j]);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ }
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(ibuf);
+ HDfree(obuf);
+} /* test_reference_vlen_obj() */
+
+/****************************************************************
+**
+** test_reference_cmpnd_obj(): Test basic H5R (reference) object reference
+** within a compound type.
+** Tests references to various kinds of objects
+**
+****************************************************************/
+static void
+test_reference_cmpnd_obj(void)
+{
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t group; /* Group ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t cmpnd_dims[] = {1};
+ hid_t dapl_id; /* Dataset access property list */
+ unsigned * ibuf, *obuf;
+ unsigned i; /* Counter */
+ H5O_type_t obj_type; /* Object type */
+ herr_t ret; /* Generic return value */
+ s2_t cmpnd_wbuf, cmpnd_rbuf;
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Object Reference Functions within compound type\n"));
+
+ /* Allocate write & read buffers */
+ ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ obuf[i] = i * 3;
+
+ /* Create file */
+ fid1 = H5Fcreate(FILE_REF_CMPND_OBJ, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create dataset access property list */
+ dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
+
+ /* Create a group */
+ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
+
+ /* Create a dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Create another dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, FAIL, "H5Dcreate2");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Create a datatype to refer to */
+ tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
+
+ /* Insert fields */
+ ret = H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ /* Save datatype for later */
+ ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit2");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Create compound type */
+ tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s2_t));
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
+
+ /* Insert fields */
+ ret = H5Tinsert(tid1, "ref0", HOFFSET(s2_t, ref0), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref1", HOFFSET(s2_t, ref1), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref2", HOFFSET(s2_t, ref2), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref3", HOFFSET(s2_t, ref3), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "dim_idx", HOFFSET(s2_t, dim_idx), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, cmpnd_dims, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create a dataset */
+ dataset = H5Dcreate2(fid1, "Dataset3", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Reset buffer for writing */
+ HDmemset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &cmpnd_wbuf.ref0);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref0, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset2", H5P_DEFAULT, &cmpnd_wbuf.ref1);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref1, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to group */
+ ret = H5Rcreate_object(fid1, "/Group1", H5P_DEFAULT, &cmpnd_wbuf.ref2);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref2, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
+
+ /* Create reference to named datatype */
+ ret = H5Rcreate_object(fid1, "/Group1/Datatype1", H5P_DEFAULT, &cmpnd_wbuf.ref3);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref3, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_NAMED_DATATYPE, "H5Rget_obj_type3");
+
+ /* Store dimensions */
+ cmpnd_wbuf.dim_idx = SPACE1_DIM1;
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid1 = H5Fopen(FILE_REF_CMPND_OBJ, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
+
+ /* Open the dataset */
+ dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
+
+ tid1 = H5Dget_type(dataset);
+ CHECK(tid1, H5I_INVALID_HID, "H5Dget_type");
+
+ /* Read selection from disk */
+ ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_rbuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ VERIFY(cmpnd_rbuf.dim_idx, SPACE1_DIM1, "H5Dread");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Open dataset object */
+ dset2 = H5Ropen_object(&cmpnd_rbuf.ref0, H5P_DEFAULT, dapl_id);
+ CHECK(dset2, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Check information in referenced dataset */
+ sid1 = H5Dget_space(dset2);
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
+
+ ret = (int)H5Sget_simple_extent_npoints(sid1);
+ VERIFY(ret, SPACE1_DIM1, "H5Sget_simple_extent_npoints");
+
+ /* Read from disk */
+ ret = H5Dread(dset2, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ VERIFY(ibuf[i], i * 3, "Data");
+
+ /* Close dereferenced Dataset */
+ ret = H5Dclose(dset2);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Open group object. GAPL isn't supported yet. But it's harmless to pass in */
+ group = H5Ropen_object(&cmpnd_rbuf.ref2, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Open datatype object. TAPL isn't supported yet. But it's harmless to pass in */
+ tid1 = H5Ropen_object(&cmpnd_rbuf.ref3, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tid1, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Verify correct datatype */
+ {
+ H5T_class_t tclass;
+
+ tclass = H5Tget_class(tid1);
+ VERIFY(tclass, H5T_COMPOUND, "H5Tget_class");
+
+ ret = H5Tget_nmembers(tid1);
+ VERIFY(ret, 3, "H5Tget_nmembers");
+ }
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close dataset access property list */
+ ret = H5Pclose(dapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Destroy references */
+ ret = H5Rdestroy(&cmpnd_wbuf.ref0);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref1);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref2);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref3);
+ CHECK(ret, FAIL, "H5Rdestroy");
+
+ ret = H5Rdestroy(&cmpnd_rbuf.ref0);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref1);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref2);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref3);
+ CHECK(ret, FAIL, "H5Rdestroy");
+
+ /* Free memory buffers */
+ HDfree(ibuf);
+ HDfree(obuf);
+} /* test_reference_cmpnd_obj() */
+
+/****************************************************************
+**
** test_reference_region(): Test basic H5R (reference) object reference code.
** Tests references to various kinds of objects
**
@@ -564,11 +1130,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE2_RANK]; /* Selection bounds */
hsize_t high[SPACE2_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
H5R_ref_t nvrbuf[3] = {{{{0}}}, {{{101}}}, {{{255}}}}; /* buffer with non-valid refs */
- uint8_t * dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ uint8_t * dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Type of object */
int i, j; /* Counters */
@@ -629,194 +1195,199 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create a dataset */
- dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset1, H5I_INVALID_HID, "H5Dcreate2");
+ H5E_BEGIN_TRY
+ {
+ dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
- /* Create references */
+ if (dset1 < 0) {
+ VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
- /* Select 6x6 hyperslab for first reference */
- start[0] = 2;
- start[1] = 2;
- stride[0] = 1;
- stride[1] = 1;
- count[0] = 1;
- count[1] = 1;
- block[0] = 6;
- block[1] = 6;
- ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
- ret = (int)H5Sget_select_npoints(sid2);
- VERIFY(ret, 36, "H5Sget_select_npoints");
+ ret = H5Sclose(sid2);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[0]);
- CHECK(ret, FAIL, "H5Rcreate_region");
- ret = H5Rget_obj_type3(&wbuf[0], H5P_DEFAULT, &obj_type);
- CHECK(ret, FAIL, "H5Rget_obj_type3");
- VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
- /* Select sequence of ten points for second reference */
- coord1[0][0] = 6;
- coord1[0][1] = 9;
- coord1[1][0] = 2;
- coord1[1][1] = 2;
- coord1[2][0] = 8;
- coord1[2][1] = 4;
- coord1[3][0] = 1;
- coord1[3][1] = 6;
- coord1[4][0] = 2;
- coord1[4][1] = 8;
- coord1[5][0] = 3;
- coord1[5][1] = 2;
- coord1[6][0] = 0;
- coord1[6][1] = 4;
- coord1[7][0] = 9;
- coord1[7][1] = 0;
- coord1[8][0] = 7;
- coord1[8][1] = 1;
- coord1[9][0] = 3;
- coord1[9][1] = 3;
- ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t *)coord1);
- CHECK(ret, FAIL, "H5Sselect_elements");
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+ }
+ else {
- ret = (int)H5Sget_select_npoints(sid2);
- VERIFY(ret, SPACE2_DIM2, "H5Sget_select_npoints");
+ CHECK(dset1, H5I_INVALID_HID, "H5Dcreate2");
- /* Store second dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[1]);
- CHECK(ret, FAIL, "H5Rcreate_region");
+ /* Create references */
- /* Select unlimited hyperslab for third reference */
- start[0] = 1;
- start[1] = 8;
- stride[0] = 4;
- stride[1] = 1;
- count[0] = H5S_UNLIMITED;
- count[1] = 1;
- block[0] = 2;
- block[1] = 2;
- ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ /* Select 6x6 hyperslab for first reference */
+ start[0] = 2;
+ start[1] = 2;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = 6;
+ block[1] = 6;
+ ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block);
+ CHECK(ret, FAIL, "H5Sselect_hyperslab");
- hssize_ret = H5Sget_select_npoints(sid2);
- VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
+ ret = (int)H5Sget_select_npoints(sid2);
+ VERIFY(ret, 36, "H5Sget_select_npoints");
- /* Store third dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[2]);
- CHECK(ret, FAIL, "H5Rcreate_region");
+ /* Store first dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[0]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
+ ret = H5Rget_obj_type3(&wbuf[0], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
- ret = H5Rget_obj_type3(&wbuf[2], H5P_DEFAULT, &obj_type);
- CHECK(ret, FAIL, "H5Rget_obj_type3");
- VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+ /* Select sequence of ten points for second reference */
+ coord1[0][0] = 6;
+ coord1[0][1] = 9;
+ coord1[1][0] = 2;
+ coord1[1][1] = 2;
+ coord1[2][0] = 8;
+ coord1[2][1] = 4;
+ coord1[3][0] = 1;
+ coord1[3][1] = 6;
+ coord1[4][0] = 2;
+ coord1[4][1] = 8;
+ coord1[5][0] = 3;
+ coord1[5][1] = 2;
+ coord1[6][0] = 0;
+ coord1[6][1] = 4;
+ coord1[7][0] = 9;
+ coord1[7][1] = 0;
+ coord1[8][0] = 7;
+ coord1[8][1] = 1;
+ coord1[9][0] = 3;
+ coord1[9][1] = 3;
+ ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t *)coord1);
+ CHECK(ret, FAIL, "H5Sselect_elements");
- /* Store fourth dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[3]);
- CHECK(ret, FAIL, "H5Rcreate_region");
+ ret = (int)H5Sget_select_npoints(sid2);
+ VERIFY(ret, SPACE2_DIM2, "H5Sget_select_npoints");
- /* Write selection to disk */
- H5E_BEGIN_TRY
- {
- ret = H5Dwrite(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
- }
- H5E_END_TRY;
+ /* Store second dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[1]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
- if (libver_high < H5F_LIBVER_V110)
- VERIFY(ret, FAIL, "H5Dwrite");
- else
- CHECK(ret, FAIL, "H5Dwrite");
+ /* Select unlimited hyperslab for third reference */
+ start[0] = 1;
+ start[1] = 8;
+ stride[0] = 4;
+ stride[1] = 1;
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ block[0] = 2;
+ block[1] = 2;
+ ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block);
+ CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /*
- * Store a dataset region reference which will not get written to disk
- */
+ hssize_ret = H5Sget_select_npoints(sid2);
+ VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
- /* Create the dataspace of the region references */
- space_NA = H5Screate_simple(1, dims_NA, NULL);
- CHECK(space_NA, H5I_INVALID_HID, "H5Screate_simple");
+ /* Store third dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[2]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
- /* Create the dataset and write the region references to it */
- dset_NA = H5Dcreate2(fid1, "DS_NA", H5T_STD_REF, space_NA, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset_NA, H5I_INVALID_HID, "H5Dcreate");
+ ret = H5Rget_obj_type3(&wbuf[2], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
- /* Close and release resources for undefined region reference tests */
- ret = H5Dclose(dset_NA);
- CHECK(ret, FAIL, "H5Dclose");
- ret = H5Sclose(space_NA);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Store fourth dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[3]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
- /* Close disk dataspace */
- ret = H5Sclose(sid1);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Write selection to disk */
+ ret = H5Dwrite(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
- /* Close Dataset */
- ret = H5Dclose(dset1);
- CHECK(ret, FAIL, "H5Dclose");
+ /*
+ * Store a dataset region reference which will not get written to disk
+ */
- /* Close uint8 dataset dataspace */
- ret = H5Sclose(sid2);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Create the dataspace of the region references */
+ space_NA = H5Screate_simple(1, dims_NA, NULL);
+ CHECK(space_NA, H5I_INVALID_HID, "H5Screate_simple");
- /* Close file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Create the dataset and write the region references to it */
+ dset_NA = H5Dcreate2(fid1, "DS_NA", H5T_STD_REF, space_NA, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dset_NA, H5I_INVALID_HID, "H5Dcreate");
- /* Re-open the file */
- fid1 = H5Fopen(FILE_REF_REG, H5F_ACC_RDWR, fapl);
- CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
+ /* Close and release resources for undefined region reference tests */
+ ret = H5Dclose(dset_NA);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Sclose(space_NA);
+ CHECK(ret, FAIL, "H5Sclose");
- /*
- * Start the test of an undefined reference
- */
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Open the dataset of the undefined references */
- dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
- CHECK(dset_NA, H5I_INVALID_HID, "H5Dopen2");
+ /* Close Dataset */
+ ret = H5Dclose(dset1);
+ CHECK(ret, FAIL, "H5Dclose");
- /* Read the data */
- ret = H5Dread(dset_NA, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
- CHECK(ret, FAIL, "H5Dread");
+ /* Close uint8 dataset dataspace */
+ ret = H5Sclose(sid2);
+ CHECK(ret, FAIL, "H5Sclose");
- /*
- * Dereference an undefined reference (should fail)
- */
- H5E_BEGIN_TRY
- {
- dset2 = H5Ropen_object(&rdata_NA[0], H5P_DEFAULT, H5P_DEFAULT);
- }
- H5E_END_TRY;
- VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object");
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Close and release resources. */
- ret = H5Dclose(dset_NA);
- CHECK(ret, FAIL, "H5Dclose");
+ /* Re-open the file */
+ fid1 = H5Fopen(FILE_REF_REG, H5F_ACC_RDWR, fapl);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
- /* This close should fail since H5Ropen_object never created
- * the id of the referenced object. */
- H5E_BEGIN_TRY
- {
- ret = H5Dclose(dset2);
- }
- H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Dclose");
+ /*
+ * Start the test of an undefined reference
+ */
- /*
- * End the test of an undefined reference
- */
+ /* Open the dataset of the undefined references */
+ dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
+ CHECK(dset_NA, H5I_INVALID_HID, "H5Dopen2");
- /* Open the dataset */
- dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
- CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
+ /* Read the data */
+ ret = H5Dread(dset_NA, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
+ CHECK(ret, FAIL, "H5Dread");
- /* Read selection from disk */
- H5E_BEGIN_TRY
- {
- ret = H5Dread(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
- }
- H5E_END_TRY;
+ /*
+ * Dereference an undefined reference (should fail)
+ */
+ H5E_BEGIN_TRY
+ {
+ dset2 = H5Ropen_object(&rdata_NA[0], H5P_DEFAULT, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
+ VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object");
- if (libver_high < H5F_LIBVER_V110)
- CHECK(ret, FAIL, "H5Dread");
- else {
+ /* Close and release resources. */
+ ret = H5Dclose(dset_NA);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* This close should fail since H5Ropen_object never created
+ * the id of the referenced object. */
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dclose(dset2);
+ }
+ H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Dclose");
+
+ /*
+ * End the test of an undefined reference
+ */
+
+ /* Open the dataset */
+ dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
+ CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
+
+ /* Read selection from disk */
+ ret = H5Dread(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
CHECK(ret, FAIL, "H5Dread");
/* Try to open objects */
@@ -851,9 +1422,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 36, "H5Sget_select_npoints");
ret = (int)H5Sget_select_hyper_nblocks(sid2);
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) *
- 2); /* allocate space for the hyperslab blocks */
- ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
+
+ /* allocate space for the hyperslab blocks */
+ coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t) * 2);
+
+ ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
VERIFY(coords[0], 2, "Hyperslab Coordinates");
VERIFY(coords[1], 2, "Hyperslab Coordinates");
@@ -880,9 +1453,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_npoints");
ret = (int)H5Sget_select_elem_npoints(sid2);
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_elem_npoints");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK *
- sizeof(hsize_t)); /* allocate space for the element points */
- ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
+
+ /* allocate space for the element points */
+ coords = (hsize_t *)HDmalloc((size_t)ret * SPACE2_RANK * sizeof(hsize_t));
+
+ ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
VERIFY(coords[0], coord1[0][0], "Element Coordinates");
VERIFY(coords[1], coord1[0][1], "Element Coordinates");
@@ -958,25 +1533,23 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Rget_obj_type3");
} /* end for */
- }
- /* Close Dataset */
- ret = H5Dclose(dset1);
- CHECK(ret, FAIL, "H5Dclose");
+ /* Close Dataset */
+ ret = H5Dclose(dset1);
+ CHECK(ret, FAIL, "H5Dclose");
- /* Close dataset access property list */
- ret = H5Pclose(dapl_id);
- CHECK(ret, FAIL, "H5Pclose");
+ /* Close dataset access property list */
+ ret = H5Pclose(dapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
- /* Close file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Destroy references */
- for (j = 0; j < SPACE1_DIM1; j++) {
- ret = H5Rdestroy(&wbuf[j]);
- CHECK(ret, FAIL, "H5Rdestroy");
- if (libver_high >= H5F_LIBVER_V110) {
+ /* Destroy references */
+ for (j = 0; j < SPACE1_DIM1; j++) {
+ ret = H5Rdestroy(&wbuf[j]);
+ CHECK(ret, FAIL, "H5Rdestroy");
ret = H5Rdestroy(&rbuf[j]);
CHECK(ret, FAIL, "H5Rdestroy");
}
@@ -987,6 +1560,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
HDfree(rbuf);
HDfree(dwbuf);
HDfree(drbuf);
+
} /* test_reference_region() */
/****************************************************************
@@ -1019,10 +1593,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE3_RANK]; /* Selection bounds */
hsize_t high[SPACE3_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
- uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
+ uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Object type */
int i; /* Counter */
@@ -1077,221 +1651,249 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create a dataset */
- dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ H5E_BEGIN_TRY
+ {
+ dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
- /* Create references */
+ if (dset1 < 0) {
- /* Select 15 2x1 hyperslabs for first reference */
- start[0] = 2;
- stride[0] = 5;
- count[0] = 15;
- block[0] = 2;
- ret = H5Sselect_hyperslab(sid3, H5S_SELECT_SET, start, stride, count, block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
- ret = (int)H5Sget_select_npoints(sid3);
- VERIFY(ret, (block[0] * count[0]), "H5Sget_select_npoints");
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[0]);
- CHECK(ret, FAIL, "H5Rcreate_region");
- ret = H5Rget_obj_type3(&wbuf[0], H5P_DEFAULT, &obj_type);
- CHECK(ret, FAIL, "H5Rget_obj_type3");
- VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+ ret = H5Sclose(sid3);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Select sequence of ten points for second reference */
- coord1[0][0] = 16;
- coord1[1][0] = 22;
- coord1[2][0] = 38;
- coord1[3][0] = 41;
- coord1[4][0] = 52;
- coord1[5][0] = 63;
- coord1[6][0] = 70;
- coord1[7][0] = 89;
- coord1[8][0] = 97;
- coord1[9][0] = 03;
- ret = H5Sselect_elements(sid3, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t *)coord1);
- CHECK(ret, FAIL, "H5Sselect_elements");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
- ret = (int)H5Sget_select_npoints(sid3);
- VERIFY(ret, POINT1_NPOINTS, "H5Sget_select_npoints");
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+ }
+ else {
- /* Store second dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[1]);
- CHECK(ret, FAIL, "H5Rcreate_region");
+ CHECK(ret, FAIL, "H5Dcreate2");
- /* Write selection to disk */
- ret = H5Dwrite(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
- CHECK(ret, FAIL, "H5Dwrite");
+ /* Create references */
- /* Close disk dataspace */
- ret = H5Sclose(sid1);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Select 15 2x1 hyperslabs for first reference */
+ start[0] = 2;
+ stride[0] = 5;
+ count[0] = 15;
+ block[0] = 2;
+ ret = H5Sselect_hyperslab(sid3, H5S_SELECT_SET, start, stride, count, block);
+ CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Close Dataset */
- ret = H5Dclose(dset1);
- CHECK(ret, FAIL, "H5Dclose");
+ ret = (int)H5Sget_select_npoints(sid3);
+ VERIFY(ret, (block[0] * count[0]), "H5Sget_select_npoints");
- /* Close uint8 dataset dataspace */
- ret = H5Sclose(sid3);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Store first dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[0]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
+ ret = H5Rget_obj_type3(&wbuf[0], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
- /* Close file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Select sequence of ten points for second reference */
+ coord1[0][0] = 16;
+ coord1[1][0] = 22;
+ coord1[2][0] = 38;
+ coord1[3][0] = 41;
+ coord1[4][0] = 52;
+ coord1[5][0] = 63;
+ coord1[6][0] = 70;
+ coord1[7][0] = 89;
+ coord1[8][0] = 97;
+ coord1[9][0] = 03;
+ ret = H5Sselect_elements(sid3, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t *)coord1);
+ CHECK(ret, FAIL, "H5Sselect_elements");
+
+ ret = (int)H5Sget_select_npoints(sid3);
+ VERIFY(ret, POINT1_NPOINTS, "H5Sget_select_npoints");
+
+ /* Store second dataset region */
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[1]);
+ CHECK(ret, FAIL, "H5Rcreate_region");
- /* Re-open the file */
- fid1 = H5Fopen(FILE_REF_REG_1D, H5F_ACC_RDWR, fapl);
- CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
+ /* Write selection to disk */
+ ret = H5Dwrite(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
- /* Open the dataset */
- dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
- CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Read selection from disk */
- ret = H5Dread(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
- CHECK(ret, FAIL, "H5Dread");
+ /* Close Dataset */
+ ret = H5Dclose(dset1);
+ CHECK(ret, FAIL, "H5Dclose");
- /* Try to open objects */
- dset3 = H5Ropen_object(&rbuf[0], H5P_DEFAULT, dapl_id);
- CHECK(dset3, H5I_INVALID_HID, "H5Ropen_object");
+ /* Close uint8 dataset dataspace */
+ ret = H5Sclose(sid3);
+ CHECK(ret, FAIL, "H5Sclose");
- /* Check what H5Rget_obj_type3 function returns */
- ret = H5Rget_obj_type3(&rbuf[0], H5P_DEFAULT, &obj_type);
- CHECK(ret, FAIL, "H5Rget_obj_type3");
- VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Check information in referenced dataset */
- sid1 = H5Dget_space(dset3);
- CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
+ /* Re-open the file */
+ fid1 = H5Fopen(FILE_REF_REG_1D, H5F_ACC_RDWR, fapl);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
- ret = (int)H5Sget_simple_extent_npoints(sid1);
- VERIFY(ret, SPACE3_DIM1, "H5Sget_simple_extent_npoints");
+ /* Open the dataset */
+ dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
+ CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
- /* Read from disk */
- ret = H5Dread(dset3, H5T_STD_U8LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, drbuf);
- CHECK(ret, FAIL, "H5Dread");
+ /* Read selection from disk */
+ ret = H5Dread(dset1, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
+ CHECK(ret, FAIL, "H5Dread");
- for (tu8 = (uint8_t *)drbuf, i = 0; i < SPACE3_DIM1; i++, tu8++)
- VERIFY(*tu8, (uint8_t)(i * 3), "Data");
-
- /* Get the hyperslab selection */
- sid3 = H5Ropen_region(&rbuf[0], H5P_DEFAULT, H5P_DEFAULT);
- CHECK(sid3, H5I_INVALID_HID, "H5Ropen_region");
-
- /* Verify correct hyperslab selected */
- ret = (int)H5Sget_select_npoints(sid3);
- VERIFY(ret, 30, "H5Sget_select_npoints");
- ret = (int)H5Sget_select_hyper_nblocks(sid3);
- VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) *
- 2); /* allocate space for the hyperslab blocks */
- ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
- CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
- VERIFY(coords[0], 2, "Hyperslab Coordinates");
- VERIFY(coords[1], 3, "Hyperslab Coordinates");
- VERIFY(coords[2], 7, "Hyperslab Coordinates");
- VERIFY(coords[3], 8, "Hyperslab Coordinates");
- VERIFY(coords[4], 12, "Hyperslab Coordinates");
- VERIFY(coords[5], 13, "Hyperslab Coordinates");
- VERIFY(coords[6], 17, "Hyperslab Coordinates");
- VERIFY(coords[7], 18, "Hyperslab Coordinates");
- VERIFY(coords[8], 22, "Hyperslab Coordinates");
- VERIFY(coords[9], 23, "Hyperslab Coordinates");
- VERIFY(coords[10], 27, "Hyperslab Coordinates");
- VERIFY(coords[11], 28, "Hyperslab Coordinates");
- VERIFY(coords[12], 32, "Hyperslab Coordinates");
- VERIFY(coords[13], 33, "Hyperslab Coordinates");
- VERIFY(coords[14], 37, "Hyperslab Coordinates");
- VERIFY(coords[15], 38, "Hyperslab Coordinates");
- VERIFY(coords[16], 42, "Hyperslab Coordinates");
- VERIFY(coords[17], 43, "Hyperslab Coordinates");
- VERIFY(coords[18], 47, "Hyperslab Coordinates");
- VERIFY(coords[19], 48, "Hyperslab Coordinates");
- VERIFY(coords[20], 52, "Hyperslab Coordinates");
- VERIFY(coords[21], 53, "Hyperslab Coordinates");
- VERIFY(coords[22], 57, "Hyperslab Coordinates");
- VERIFY(coords[23], 58, "Hyperslab Coordinates");
- VERIFY(coords[24], 62, "Hyperslab Coordinates");
- VERIFY(coords[25], 63, "Hyperslab Coordinates");
- VERIFY(coords[26], 67, "Hyperslab Coordinates");
- VERIFY(coords[27], 68, "Hyperslab Coordinates");
- VERIFY(coords[28], 72, "Hyperslab Coordinates");
- VERIFY(coords[29], 73, "Hyperslab Coordinates");
- HDfree(coords);
- ret = H5Sget_select_bounds(sid3, low, high);
- CHECK(ret, FAIL, "H5Sget_select_bounds");
- VERIFY(low[0], 2, "Selection Bounds");
- VERIFY(high[0], 73, "Selection Bounds");
-
- /* Close region space */
- ret = H5Sclose(sid3);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Try to open objects */
+ dset3 = H5Ropen_object(&rbuf[0], H5P_DEFAULT, dapl_id);
+ CHECK(dset3, H5I_INVALID_HID, "H5Ropen_object");
- /* Get the element selection */
- sid3 = H5Ropen_region(&rbuf[1], H5P_DEFAULT, H5P_DEFAULT);
- CHECK(sid3, H5I_INVALID_HID, "H5Ropen_region");
-
- /* Verify correct elements selected */
- ret = (int)H5Sget_select_npoints(sid3);
- VERIFY(ret, 10, "H5Sget_select_npoints");
- ret = (int)H5Sget_select_elem_npoints(sid3);
- VERIFY(ret, 10, "H5Sget_select_elem_npoints");
- coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK *
- sizeof(hsize_t)); /* allocate space for the element points */
- ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
- CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
- VERIFY(coords[0], coord1[0][0], "Element Coordinates");
- VERIFY(coords[1], coord1[1][0], "Element Coordinates");
- VERIFY(coords[2], coord1[2][0], "Element Coordinates");
- VERIFY(coords[3], coord1[3][0], "Element Coordinates");
- VERIFY(coords[4], coord1[4][0], "Element Coordinates");
- VERIFY(coords[5], coord1[5][0], "Element Coordinates");
- VERIFY(coords[6], coord1[6][0], "Element Coordinates");
- VERIFY(coords[7], coord1[7][0], "Element Coordinates");
- VERIFY(coords[8], coord1[8][0], "Element Coordinates");
- VERIFY(coords[9], coord1[9][0], "Element Coordinates");
- HDfree(coords);
- ret = H5Sget_select_bounds(sid3, low, high);
- CHECK(ret, FAIL, "H5Sget_select_bounds");
- VERIFY(low[0], 3, "Selection Bounds");
- VERIFY(high[0], 97, "Selection Bounds");
-
- /* Close region space */
- ret = H5Sclose(sid3);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Check what H5Rget_obj_type3 function returns */
+ ret = H5Rget_obj_type3(&rbuf[0], H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
- /* Close first space */
- ret = H5Sclose(sid1);
- CHECK(ret, FAIL, "H5Sclose");
+ /* Check information in referenced dataset */
+ sid1 = H5Dget_space(dset3);
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
- /* Close dereferenced Dataset */
- ret = H5Dclose(dset3);
- CHECK(ret, FAIL, "H5Dclose");
+ ret = (int)H5Sget_simple_extent_npoints(sid1);
+ VERIFY(ret, SPACE3_DIM1, "H5Sget_simple_extent_npoints");
- /* Close Dataset */
- ret = H5Dclose(dset1);
- CHECK(ret, FAIL, "H5Dclose");
+ /* Read from disk */
+ ret = H5Dread(dset3, H5T_STD_U8LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, drbuf);
+ CHECK(ret, FAIL, "H5Dread");
- /* Close dataset access property list */
- ret = H5Pclose(dapl_id);
- CHECK(ret, FAIL, "H5Pclose");
+ for (tu8 = (uint8_t *)drbuf, i = 0; i < SPACE3_DIM1; i++, tu8++)
+ VERIFY(*tu8, (uint8_t)(i * 3), "Data");
- /* Close file access property list */
- ret = H5Pclose(fapl);
- CHECK(ret, FAIL, "H5Pclose");
+ /* Get the hyperslab selection */
+ sid3 = H5Ropen_region(&rbuf[0], H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(sid3, H5I_INVALID_HID, "H5Ropen_region");
- /* Close file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Verify correct hyperslab selected */
+ ret = (int)H5Sget_select_npoints(sid3);
+ VERIFY(ret, 30, "H5Sget_select_npoints");
+ ret = (int)H5Sget_select_hyper_nblocks(sid3);
+ VERIFY(ret, 15, "H5Sget_select_hyper_nblocks");
- /* Destroy references */
- for (i = 0; i < 2; i++) {
- ret = H5Rdestroy(&wbuf[i]);
- CHECK(ret, FAIL, "H5Rdestroy");
- ret = H5Rdestroy(&rbuf[i]);
- CHECK(ret, FAIL, "H5Rdestroy");
+ /* allocate space for the hyperslab blocks */
+ coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t) * 2);
+
+ ret = H5Sget_select_hyper_blocklist(sid3, (hsize_t)0, (hsize_t)ret, coords);
+ CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
+ VERIFY(coords[0], 2, "Hyperslab Coordinates");
+ VERIFY(coords[1], 3, "Hyperslab Coordinates");
+ VERIFY(coords[2], 7, "Hyperslab Coordinates");
+ VERIFY(coords[3], 8, "Hyperslab Coordinates");
+ VERIFY(coords[4], 12, "Hyperslab Coordinates");
+ VERIFY(coords[5], 13, "Hyperslab Coordinates");
+ VERIFY(coords[6], 17, "Hyperslab Coordinates");
+ VERIFY(coords[7], 18, "Hyperslab Coordinates");
+ VERIFY(coords[8], 22, "Hyperslab Coordinates");
+ VERIFY(coords[9], 23, "Hyperslab Coordinates");
+ VERIFY(coords[10], 27, "Hyperslab Coordinates");
+ VERIFY(coords[11], 28, "Hyperslab Coordinates");
+ VERIFY(coords[12], 32, "Hyperslab Coordinates");
+ VERIFY(coords[13], 33, "Hyperslab Coordinates");
+ VERIFY(coords[14], 37, "Hyperslab Coordinates");
+ VERIFY(coords[15], 38, "Hyperslab Coordinates");
+ VERIFY(coords[16], 42, "Hyperslab Coordinates");
+ VERIFY(coords[17], 43, "Hyperslab Coordinates");
+ VERIFY(coords[18], 47, "Hyperslab Coordinates");
+ VERIFY(coords[19], 48, "Hyperslab Coordinates");
+ VERIFY(coords[20], 52, "Hyperslab Coordinates");
+ VERIFY(coords[21], 53, "Hyperslab Coordinates");
+ VERIFY(coords[22], 57, "Hyperslab Coordinates");
+ VERIFY(coords[23], 58, "Hyperslab Coordinates");
+ VERIFY(coords[24], 62, "Hyperslab Coordinates");
+ VERIFY(coords[25], 63, "Hyperslab Coordinates");
+ VERIFY(coords[26], 67, "Hyperslab Coordinates");
+ VERIFY(coords[27], 68, "Hyperslab Coordinates");
+ VERIFY(coords[28], 72, "Hyperslab Coordinates");
+ VERIFY(coords[29], 73, "Hyperslab Coordinates");
+ HDfree(coords);
+ ret = H5Sget_select_bounds(sid3, low, high);
+ CHECK(ret, FAIL, "H5Sget_select_bounds");
+ VERIFY(low[0], 2, "Selection Bounds");
+ VERIFY(high[0], 73, "Selection Bounds");
+
+ /* Close region space */
+ ret = H5Sclose(sid3);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Get the element selection */
+ sid3 = H5Ropen_region(&rbuf[1], H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(sid3, H5I_INVALID_HID, "H5Ropen_region");
+
+ /* Verify correct elements selected */
+ ret = (int)H5Sget_select_npoints(sid3);
+ VERIFY(ret, 10, "H5Sget_select_npoints");
+ ret = (int)H5Sget_select_elem_npoints(sid3);
+ VERIFY(ret, 10, "H5Sget_select_elem_npoints");
+
+ /* allocate space for the element points */
+ coords = (hsize_t *)HDmalloc((size_t)ret * SPACE3_RANK * sizeof(hsize_t));
+
+ ret = H5Sget_select_elem_pointlist(sid3, (hsize_t)0, (hsize_t)ret, coords);
+ CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
+ VERIFY(coords[0], coord1[0][0], "Element Coordinates");
+ VERIFY(coords[1], coord1[1][0], "Element Coordinates");
+ VERIFY(coords[2], coord1[2][0], "Element Coordinates");
+ VERIFY(coords[3], coord1[3][0], "Element Coordinates");
+ VERIFY(coords[4], coord1[4][0], "Element Coordinates");
+ VERIFY(coords[5], coord1[5][0], "Element Coordinates");
+ VERIFY(coords[6], coord1[6][0], "Element Coordinates");
+ VERIFY(coords[7], coord1[7][0], "Element Coordinates");
+ VERIFY(coords[8], coord1[8][0], "Element Coordinates");
+ VERIFY(coords[9], coord1[9][0], "Element Coordinates");
+ HDfree(coords);
+ ret = H5Sget_select_bounds(sid3, low, high);
+ CHECK(ret, FAIL, "H5Sget_select_bounds");
+ VERIFY(low[0], 3, "Selection Bounds");
+ VERIFY(high[0], 97, "Selection Bounds");
+
+ /* Close region space */
+ ret = H5Sclose(sid3);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close first space */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close dereferenced Dataset */
+ ret = H5Dclose(dset3);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dset1);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close dataset access property list */
+ ret = H5Pclose(dapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file access property list */
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Destroy references */
+ for (i = 0; i < 2; i++) {
+ ret = H5Rdestroy(&wbuf[i]);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&rbuf[i]);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ }
}
/* Free memory buffers */
@@ -1299,6 +1901,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
HDfree(rbuf);
HDfree(dwbuf);
HDfree(drbuf);
+
} /* test_reference_region_1D() */
/****************************************************************
@@ -2135,10 +2738,10 @@ test_reference_compat_conv(void)
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hobj_ref_t * wbuf_obj; /* Buffer to write to disk */
- H5R_ref_t * rbuf_obj; /* Buffer read from disk */
- hdset_reg_ref_t *wbuf_reg; /* Buffer to write to disk */
- H5R_ref_t * rbuf_reg; /* Buffer read from disk */
+ hobj_ref_t * wbuf_obj = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_obj = NULL; /* Buffer read from disk */
+ hdset_reg_ref_t *wbuf_reg = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_reg = NULL; /* Buffer read from disk */
H5O_type_t obj_type; /* Object type */
herr_t ret; /* Generic return value */
unsigned int i; /* Counter */
@@ -2244,7 +2847,7 @@ test_reference_compat_conv(void)
/* Create a dataset with region reference datatype */
dataset = H5Dcreate2(fid1, "Dataset4", H5T_STD_REF_DSETREG, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Select 6x6 hyperslab for first reference */
start[0] = 2;
@@ -2312,11 +2915,11 @@ test_reference_compat_conv(void)
/* Re-open the file */
fid1 = H5Fopen(FILE_REF_COMPAT, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the object reference dataset */
dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_obj);
@@ -2370,7 +2973,7 @@ test_reference_compat_conv(void)
/* Open the dataset region reference dataset */
dataset = H5Dopen2(fid1, "/Dataset4", H5P_DEFAULT);
- CHECK(ret, H5I_INVALID_HID, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
@@ -2854,15 +3457,17 @@ test_reference(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing References\n"));
- test_reference_params(); /* Test for correct parameter checking */
- test_reference_obj(); /* Test basic H5R object reference code */
+ test_reference_params(); /* Test for correct parameter checking */
+ test_reference_obj(); /* Test basic H5R object reference code */
+ test_reference_vlen_obj(); /* Test reference within vlen */
+ test_reference_cmpnd_obj(); /* Test reference within compound type */
/* Loop through all the combinations of low/high version bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
for (high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
/* Invalid combinations, just continue */
- if (high <= H5F_LIBVER_V110 || high < low)
+ if (high == H5F_LIBVER_EARLIEST || high < low)
continue;
test_reference_region(low, high); /* Test basic H5R dataset region reference code */
@@ -2900,6 +3505,8 @@ cleanup_reference(void)
{
HDremove(FILE_REF_PARAM);
HDremove(FILE_REF_OBJ);
+ HDremove(FILE_REF_VL_OBJ);
+ HDremove(FILE_REF_CMPND_OBJ);
HDremove(FILE_REF_REG);
HDremove(FILE_REF_REG_1D);
HDremove(FILE_REF_OBJ_DEL);
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 4f729b6..24371ef 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1421,9 +1421,9 @@ test_reference_group(void)
/* Create bottom dataset */
did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(did > 0);
+ HDassert(did > 0);
ret = H5Dclose(did);
- assert(ret >= 0);
+ HDassert(ret >= 0);
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
diff --git a/test/trefstr.c b/test/trefstr.c
index 18e357e..0dcf621 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -265,7 +265,9 @@ test_refstr_wrap(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- CHECK(s, buf, "wrapping");
+ if (s == buf)
+ TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
+ __LINE__);
cmp = HDstrcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
diff --git a/test/tselect.c b/test/tselect.c
index 9fca247..1bfb663 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1533,7 +1533,7 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12))
+ if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -1676,7 +1676,7 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1))
+ if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
TestErrPrintf("Error: hyperslab values don't match!\n");
/* Close memory dataspace */
@@ -1926,10 +1926,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR
/****************************************************************
**
** 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 H5Sselect_shape_same in isolation, so now we try to do
-** I/O.
+** selection code with contiguous source and target having
+** different ranks but the same shape. We have already
+** tested H5Sselect_shape_same in isolation, so now we try to do
+** I/O.
**
****************************************************************/
static void
@@ -2579,7 +2579,7 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
static void
test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, unsigned tgt_n_cube_rank,
unsigned edge_size, unsigned checker_edge_size,
- unsigned sel_rank, hsize_t sel_start[])
+ unsigned sel_rank, const hsize_t sel_start[])
{
hbool_t first_selection = TRUE;
unsigned n_cube_offset;
@@ -3783,7 +3783,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2))
+ if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -3996,7 +3996,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2))
+ if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("point values don't match!\n");
/* Close memory dataspace */
@@ -5257,7 +5257,7 @@ test_select_hyper_union_stagger(void)
CHECK(error, FAIL, "H5Fclose");
/* Initialize intput buffer */
- memset(data_out, 0, 7 * 7 * sizeof(int));
+ HDmemset(data_out, 0, 7 * 7 * sizeof(int));
/* Open file */
file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -5381,9 +5381,9 @@ test_select_hyper_union_3d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -5555,7 +5555,7 @@ test_select_hyper_valid_combination(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Selection Combination Validity\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for single point selection */
single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL);
@@ -8401,7 +8401,7 @@ test_shape_same(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape Comparisons\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -9770,15 +9770,15 @@ test_shape_same_dr__smoke_check_1(void)
** a "checker board" hyperslab as follows:
**
** * * - - * * - - * *
-** * * - - * * - - * *
-** - - * * - - * * - -
-** - - * * - - * * - -
** * * - - * * - - * *
-** * * - - * * - - * *
-** - - * * - - * * - -
-** - - * * - - * * - -
+** - - * * - - * * - -
+** - - * * - - * * - -
+** * * - - * * - - * *
+** * * - - * * - - * *
+** - - * * - - * * - -
+** - - * * - - * * - -
+** * * - - * * - - * *
** * * - - * * - - * *
-** * * - - * * - - * *
**
** where asterisks indicate selected elements, and dashes
** indicate unselected elements.
@@ -12085,16 +12085,16 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* For irregular hyperslab */
sid_irreg1 = H5Screate_simple(SPACERE1_RANK, dims1, NULL);
@@ -12121,11 +12121,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 2-D hyperslab selection\n"));
@@ -12172,7 +12172,7 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
@@ -12181,7 +12181,7 @@ test_space_rebuild(void)
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* 2-D irregular case */
sid_irreg2 = H5Screate_simple(SPACERE2_RANK, dims2, NULL);
@@ -12213,11 +12213,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 3-D hyperslab selection\n"));
@@ -12269,16 +12269,16 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
sid_irreg3 = H5Screate_simple(SPACERE3_RANK, dims3, NULL);
@@ -12315,11 +12315,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 4-D hyperslab selection\n"));
@@ -12377,16 +12377,16 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* Testing irregular selection */
sid_irreg4 = H5Screate_simple(SPACERE4_RANK, dims4, NULL);
@@ -12434,11 +12434,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 5-D hyperslab selection\n"));
@@ -12501,16 +12501,16 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
sid_irreg5 = H5Screate_simple(SPACERE5_RANK, dims5, NULL);
@@ -12563,11 +12563,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* We use 5-D to test a special case with
@@ -12610,11 +12610,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* Adding some selections to make it real irregular */
@@ -12638,11 +12638,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* Add more selections to make it regular again */
@@ -12666,11 +12666,11 @@ test_space_rebuild(void)
if (rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
if (rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret, FAIL, "H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
H5Sclose(sid_reg1);
@@ -14277,18 +14277,18 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t enpoints, hssize_t enb
/* Verify blocklist */
if (nblocks == (hssize_t)1) {
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])))
+ if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
else {
HDassert(nblocks == (hssize_t)2);
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0]))) {
- if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])))
+ if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
+ if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
- if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])))
+ if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
- else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])))
+ else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end else */
} /* end if */
@@ -14705,7 +14705,7 @@ test_internal_consistency(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Consistency of Internal States\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -15164,6 +15164,20 @@ test_sel_iter(void)
iter_id = H5Ssel_iter_create(sid, (size_t)1, (unsigned)sel_iter_flags);
CHECK(iter_id, FAIL, "H5Ssel_iter_create");
+ /* Try resetting selection iterator with bad parameters */
+ H5E_BEGIN_TRY
+ {
+ ret = H5Ssel_iter_reset(H5I_INVALID_HID, sid);
+ }
+ H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Ssel_iter_reset");
+ H5E_BEGIN_TRY
+ {
+ ret = H5Ssel_iter_reset(iter_id, H5I_INVALID_HID);
+ }
+ H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Ssel_iter_reset");
+
/* Try retrieving sequences, with bad parameters */
H5E_BEGIN_TRY
{ /* Invalid ID */
@@ -15314,6 +15328,167 @@ test_sel_iter(void)
CHECK(ret, FAIL, "H5Ssel_iter_close");
} /* end for */
+ /* Create selection iterator object */
+ iter_id = H5Ssel_iter_create(sid, (size_t)1, (unsigned)sel_iter_flags);
+ CHECK(iter_id, FAIL, "H5Ssel_iter_create");
+
+ /* Test iterators on various basic selection types using
+ * H5Ssel_iter_reset instead of creating multiple iterators */
+ for (sel_type = H5S_SEL_NONE; sel_type <= H5S_SEL_ALL; sel_type = (H5S_sel_type)(sel_type + 1)) {
+ switch (sel_type) {
+ case H5S_SEL_NONE: /* "None" selection */
+ ret = H5Sselect_none(sid);
+ CHECK(ret, FAIL, "H5Sselect_none");
+ break;
+
+ case H5S_SEL_POINTS: /* Point selection */
+ /* Select sequence of ten points */
+ coord1[0][0] = 0;
+ coord1[0][1] = 9;
+ coord1[1][0] = 1;
+ coord1[1][1] = 2;
+ coord1[2][0] = 2;
+ coord1[2][1] = 4;
+ coord1[3][0] = 0;
+ coord1[3][1] = 6;
+ coord1[4][0] = 1;
+ coord1[4][1] = 8;
+ coord1[5][0] = 2;
+ coord1[5][1] = 10;
+ coord1[6][0] = 0;
+ coord1[6][1] = 11;
+ coord1[7][0] = 1;
+ coord1[7][1] = 4;
+ coord1[8][0] = 2;
+ coord1[8][1] = 1;
+ coord1[9][0] = 0;
+ coord1[9][1] = 3;
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)POINT1_NPOINTS,
+ (const hsize_t *)coord1);
+ CHECK(ret, FAIL, "H5Sselect_elements");
+ break;
+
+ case H5S_SEL_HYPERSLABS: /* Hyperslab selection */
+ /* Select regular hyperslab */
+ start[0] = 3;
+ start[1] = 0;
+ stride[0] = 2;
+ stride[1] = 2;
+ count[0] = 2;
+ count[1] = 5;
+ block[0] = 1;
+ block[1] = 1;
+ ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
+ CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ break;
+
+ case H5S_SEL_ALL: /* "All" selection */
+ ret = H5Sselect_all(sid);
+ CHECK(ret, FAIL, "H5Sselect_all");
+ break;
+
+ case H5S_SEL_ERROR:
+ case H5S_SEL_N:
+ default:
+ HDassert(0 && "Can't occur");
+ break;
+ } /* end switch */
+
+ /* Try retrieving no sequences, with 0 for maxseq & maxbytes */
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)0, (size_t)1, &nseq, &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+ VERIFY(nseq, 0, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 0, "H5Ssel_iter_get_seq_list");
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)1, (size_t)0, &nseq, &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+ VERIFY(nseq, 0, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 0, "H5Ssel_iter_get_seq_list");
+
+ /* Reset iterator */
+ ret = H5Ssel_iter_reset(iter_id, sid);
+ CHECK(ret, FAIL, "H5Ssel_iter_reset");
+
+ /* Try retrieving all sequences */
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)SEL_ITER_MAX_SEQ, (size_t)(1024 * 1024), &nseq,
+ &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+
+ /* Check results from retrieving sequence list */
+ switch (sel_type) {
+ case H5S_SEL_NONE: /* "None" selection */
+ VERIFY(nseq, 0, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 0, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_POINTS: /* Point selection */
+ VERIFY(nseq, 10, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_HYPERSLABS: /* Hyperslab selection */
+ VERIFY(nseq, 10, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_ALL: /* "All" selection */
+ VERIFY(nseq, 1, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 72, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_ERROR:
+ case H5S_SEL_N:
+ default:
+ HDassert(0 && "Can't occur");
+ break;
+ } /* end switch */
+
+ /* Reset iterator */
+ ret = H5Ssel_iter_reset(iter_id, sid);
+ CHECK(ret, FAIL, "H5Ssel_iter_reset");
+
+ /* Try retrieving all sequences again */
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)SEL_ITER_MAX_SEQ, (size_t)(1024 * 1024), &nseq,
+ &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+
+ /* Check results from retrieving sequence list */
+ switch (sel_type) {
+ case H5S_SEL_NONE: /* "None" selection */
+ VERIFY(nseq, 0, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 0, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_POINTS: /* Point selection */
+ VERIFY(nseq, 10, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_HYPERSLABS: /* Hyperslab selection */
+ VERIFY(nseq, 10, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_ALL: /* "All" selection */
+ VERIFY(nseq, 1, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 72, "H5Ssel_iter_get_seq_list");
+ break;
+
+ case H5S_SEL_ERROR:
+ case H5S_SEL_N:
+ default:
+ HDassert(0 && "Can't occur");
+ break;
+ } /* end switch */
+
+ /* Reset iterator */
+ ret = H5Ssel_iter_reset(iter_id, sid);
+ CHECK(ret, FAIL, "H5Ssel_iter_reset");
+ } /* end for */
+
+ /* Close selection iterator */
+ ret = H5Ssel_iter_close(iter_id);
+ CHECK(ret, FAIL, "H5Ssel_iter_close");
+
/* Point selection which will merge into smaller # of sequences */
coord1[0][0] = 0;
coord1[0][1] = 9;
@@ -15349,6 +15524,17 @@ test_sel_iter(void)
VERIFY(nseq, 6, "H5Ssel_iter_get_seq_list");
VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+ /* Reset iterator */
+ ret = H5Ssel_iter_reset(iter_id, sid);
+ CHECK(ret, FAIL, "H5Ssel_iter_reset");
+
+ /* Try retrieving all sequences again */
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)SEL_ITER_MAX_SEQ, (size_t)(1024 * 1024), &nseq,
+ &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+ VERIFY(nseq, 6, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 10, "H5Ssel_iter_get_seq_list");
+
/* Close selection iterator */
ret = H5Ssel_iter_close(iter_id);
CHECK(ret, FAIL, "H5Ssel_iter_close");
@@ -15387,6 +15573,17 @@ test_sel_iter(void)
VERIFY(nseq, 6, "H5Ssel_iter_get_seq_list");
VERIFY(nbytes, 20, "H5Ssel_iter_get_seq_list");
+ /* Reset iterator */
+ ret = H5Ssel_iter_reset(iter_id, sid);
+ CHECK(ret, FAIL, "H5Ssel_iter_reset");
+
+ /* Try retrieving all sequences again */
+ ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)SEL_ITER_MAX_SEQ, (size_t)(1024 * 1024), &nseq,
+ &nbytes, off, len);
+ CHECK(ret, FAIL, "H5Ssel_iter_get_seq_list");
+ VERIFY(nseq, 6, "H5Ssel_iter_get_seq_list");
+ VERIFY(nbytes, 20, "H5Ssel_iter_get_seq_list");
+
/* Close selection iterator */
ret = H5Ssel_iter_close(iter_id);
CHECK(ret, FAIL, "H5Ssel_iter_close");
@@ -15685,14 +15882,14 @@ test_hyper_io_1d(void)
/* Get the dataset's dataspace */
sid = H5Dget_space(did);
- CHECK(sid, H5I_INVALID_HID, "H5Pcreate");
+ CHECK(sid, H5I_INVALID_HID, "H5Dget_space");
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Set up contiguous memory dataspace for the selected elements */
dimsm[0] = count[0];
mid = H5Screate_simple(RANK, dimsm, NULL);
- CHECK(mid, H5I_INVALID_HID, "H5Screate");
+ CHECK(mid, H5I_INVALID_HID, "H5Screate_simple");
/* Read all the selected 10th elements in the dataset into "rdata" */
ret = H5Dread(did, H5T_NATIVE_INT, mid, sid, H5P_DEFAULT, rdata);
@@ -15718,6 +15915,76 @@ test_hyper_io_1d(void)
/****************************************************************
**
+** test_h5s_set_extent_none:
+** Test to verify the behavior of dataspace code when passed
+** a dataspace modified by H5Sset_extent_none().
+**
+****************************************************************/
+static void
+test_h5s_set_extent_none(void)
+{
+ hid_t sid = H5I_INVALID_HID;
+ hid_t dst_sid = H5I_INVALID_HID;
+ hid_t null_sid = H5I_INVALID_HID;
+ int rank = 1;
+ hsize_t current_dims = 123;
+ H5S_class_t cls;
+ int out_rank;
+ hsize_t out_dims;
+ hsize_t out_maxdims;
+ hssize_t out_points;
+ htri_t equal;
+ herr_t ret;
+
+ /* Specific values here don't matter as we're just going to reset */
+ sid = H5Screate_simple(rank, &current_dims, NULL);
+ CHECK(sid, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Dataspace class will be H5S_NULL after this.
+ * In versions prior to 1.10.7 / 1.12.1 this would produce a
+ * dataspace with the internal H5S_NO_CLASS class.
+ */
+ ret = H5Sset_extent_none(sid);
+ CHECK(ret, FAIL, "H5Sset_extent_none");
+ cls = H5Sget_simple_extent_type(sid);
+ VERIFY(cls, H5S_NULL, "H5Sget_simple_extent_type");
+
+ /* Extent getters should generate normal results and not segfault.
+ */
+ out_rank = H5Sget_simple_extent_dims(sid, &out_dims, &out_maxdims);
+ VERIFY(out_rank, 0, "H5Sget_simple_extent_dims");
+ out_rank = H5Sget_simple_extent_ndims(sid);
+ VERIFY(out_rank, 0, "H5Sget_simple_extent_ndims");
+ out_points = H5Sget_simple_extent_npoints(sid);
+ VERIFY(out_points, 0, "H5Sget_simple_extent_npoints");
+
+ /* Check that copying the new (non-)extent works.
+ */
+ dst_sid = H5Screate_simple(rank, &current_dims, NULL);
+ CHECK(dst_sid, H5I_INVALID_HID, "H5Screate_simple");
+ ret = H5Sextent_copy(dst_sid, sid);
+ CHECK(ret, FAIL, "H5Sextent_copy");
+
+ /* Check that H5Sset_extent_none() produces the same extent as
+ * H5Screate(H5S_NULL).
+ */
+ null_sid = H5Screate(H5S_NULL);
+ CHECK(null_sid, H5I_INVALID_HID, "H5Screate");
+ equal = H5Sextent_equal(sid, null_sid);
+ VERIFY(equal, TRUE, "H5Sextent_equal");
+
+ /* Close */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(dst_sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(null_sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+} /* test_h5s_set_extent_none() */
+
+/****************************************************************
+**
** test_select(): Main H5S selection testing routine.
**
****************************************************************/
@@ -15910,6 +16177,11 @@ test_select(void)
/* Test reading of 1-d disjoint file space to 1-d single block memory space */
test_hyper_io_1d();
+ /* Test H5Sset_extent_none() functionality after we updated it to set
+ * the class to H5S_NULL instead of H5S_NO_CLASS.
+ */
+ test_h5s_set_extent_none();
+
} /* test_select() */
/*-------------------------------------------------------------------------
diff --git a/test/tskiplist.c b/test/tskiplist.c
index 9ad4ea4..4bf9b11 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/tsohm.c b/test/tsohm.c
index 71e42e6..fcbb06a 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/ttime.c b/test/ttime.c
index 63906ff..c8a76e8 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 48c47be..45b26a4 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -70,8 +70,6 @@ tts_is_threadsafe(void)
if (is_ts != should_be)
TestErrPrintf("Thread-safety value incorrect - test failed\n");
-
- return;
}
/* Routine to generate attribute names for numeric values */
@@ -105,6 +103,21 @@ main(int argc, char *argv[])
/* Tests are generally arranged from least to most complexity... */
AddTest("is_threadsafe", tts_is_threadsafe, NULL, "library threadsafe status", NULL);
#ifdef H5_HAVE_THREADSAFE
+
+#ifdef H5_USE_RECURSIVE_WRITER_LOCKS
+ AddTest("rec_rwlock_1", tts_rec_rw_lock_smoke_check_1, cleanup_rec_rw_lock_smoke_check_1,
+ "recursive R/W lock smoke check 1 -- basic", NULL);
+
+ AddTest("rec_rwlock_2", tts_rec_rw_lock_smoke_check_2, cleanup_rec_rw_lock_smoke_check_2,
+ "recursive R/W lock smoke check 2 -- mob of readers", NULL);
+
+ AddTest("rec_rwlock_3", tts_rec_rw_lock_smoke_check_3, cleanup_rec_rw_lock_smoke_check_3,
+ "recursive R/W lock smoke check 3 -- mob of writers", NULL);
+
+ AddTest("rec_rwlock_4", tts_rec_rw_lock_smoke_check_4, cleanup_rec_rw_lock_smoke_check_4,
+ "recursive R/W lock smoke check 4 -- mixed mob", NULL);
+#endif /* H5_USE_RECURSIVE_WRITER_LOCKS */
+
AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL);
AddTest("error", tts_error, cleanup_error, "per-thread error stacks", NULL);
#ifdef H5_HAVE_PTHREAD_H
@@ -112,6 +125,7 @@ main(int argc, char *argv[])
AddTest("cancel", tts_cancel, cleanup_cancel, "thread cancellation safety test", NULL);
#endif /* H5_HAVE_PTHREAD_H */
AddTest("acreate", tts_acreate, cleanup_acreate, "multi-attribute creation", NULL);
+ AddTest("attr_vlen", tts_attr_vlen, cleanup_attr_vlen, "multi-file-attribute-vlen read", NULL);
#else /* H5_HAVE_THREADSAFE */
@@ -133,7 +147,7 @@ main(int argc, char *argv[])
TestSummary();
/* Clean up test files, if allowed */
- if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
+ if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP"))
TestCleanup();
/* Release test infrastructure */
diff --git a/test/ttsafe.h b/test/ttsafe.h
index 3ec4abe..b03e1ac 100644
--- a/test/ttsafe.h
+++ b/test/ttsafe.h
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -30,16 +30,30 @@ extern char *gen_name(int);
/* Prototypes for the test routines */
void tts_is_threadsafe(void);
#ifdef H5_HAVE_THREADSAFE
+#ifdef H5_USE_RECURSIVE_WRITER_LOCKS
+void tts_rec_rw_lock_smoke_check_1(void);
+void tts_rec_rw_lock_smoke_check_2(void);
+void tts_rec_rw_lock_smoke_check_3(void);
+void tts_rec_rw_lock_smoke_check_4(void);
+#endif /* H5_USE_RECURSIVE_WRITER_LOCKS */
void tts_dcreate(void);
void tts_error(void);
void tts_cancel(void);
void tts_acreate(void);
+void tts_attr_vlen(void);
/* Prototypes for the cleanup routines */
+#ifdef H5_USE_RECURSIVE_WRITER_LOCKS
+void cleanup_rec_rw_lock_smoke_check_1(void);
+void cleanup_rec_rw_lock_smoke_check_2(void);
+void cleanup_rec_rw_lock_smoke_check_3(void);
+void cleanup_rec_rw_lock_smoke_check_4(void);
+#endif /* H5_USE_RECURSIVE_WRITER_LOCKS */
void cleanup_dcreate(void);
void cleanup_error(void);
void cleanup_cancel(void);
void cleanup_acreate(void);
+void cleanup_attr_vlen(void);
#endif /* H5_HAVE_THREADSAFE */
#endif /* TTSAFE_H */
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index 58e8d9d..c2c34a0 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/ttsafe_attr_vlen.c b/test/ttsafe_attr_vlen.c
new file mode 100644
index 0000000..ecd0aa6
--- /dev/null
+++ b/test/ttsafe_attr_vlen.c
@@ -0,0 +1,176 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/********************************************************************
+ *
+ * Testing for thread safety in H5A library operations.
+ * ------------------------------------------------------------------
+ *
+ * Purpose: Verify that the segmentation fault described in HDFFV-11080
+ * is fixed.
+ *
+ * This test simulates what the user did to trigger the error:
+ * --Create an HDF5 file
+ * --Create an attribute with variable length string datatype
+ * --Attach the attribute to a group
+ * --Write data to the attribute
+ * --Close the file
+ * --Create NUM_THREADS threads
+ * --For each thread:
+ * --Open the test file
+ * --Open and read the attribute for each opened file
+ *
+ * The cause of the problem in this jira issue is due to the file pointer
+ * that is set in the variable length string datatype for the attribute.
+ * That file pointer is already closed and therefore needs to be set to
+ * the current opened file pointer when the attribute is accessed.
+ * Similar patch up was done before when reading dataset in H5D__read()
+ * in src/H5Aint.c.
+ * Hopefully this kind of patch can go away when we resolve the
+ * shared file pointer issue.
+ *
+ ********************************************************************/
+
+#include "ttsafe.h"
+
+#ifdef H5_HAVE_THREADSAFE
+
+#define FILENAME "ttsafe_attr_vlen.h5"
+#define ATTR_NAME "root_attr"
+#define NUM_THREADS 32
+
+void *tts_attr_vlen_thread(void *);
+
+void
+tts_attr_vlen(void)
+{
+ H5TS_thread_t threads[NUM_THREADS] = {0}; /* Thread declaration */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t atid = H5I_INVALID_HID; /* Datatype ID for attribute */
+ hid_t asid = H5I_INVALID_HID; /* Dataspace ID for attribute */
+ hid_t aid = H5I_INVALID_HID; /* The attribute ID */
+ const char * string_attr = "2.0"; /* The attribute data */
+ int ret; /* Return value */
+ int i; /* Local index variable */
+
+ /* Create the HDF5 test file */
+ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
+
+ /* Create variable length string type for attribute */
+ atid = H5Tcopy(H5T_C_S1);
+ CHECK(atid, H5I_INVALID_HID, "H5Tcopy");
+ H5Tset_size(atid, H5T_VARIABLE);
+
+ /* Create dataspace for attribute */
+ asid = H5Screate(H5S_SCALAR);
+ CHECK(asid, H5I_INVALID_HID, "H5Screate");
+
+ /* Open the root group */
+ gid = H5Gopen2(fid, "/", H5P_DEFAULT);
+ CHECK(gid, H5I_INVALID_HID, "H5Gopen2");
+
+ /* Attach the attribute to the root group */
+ aid = H5Acreate2(gid, ATTR_NAME, atid, asid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, H5I_INVALID_HID, "H5Acreate2");
+
+ /* Write data to the attribute */
+ ret = H5Awrite(aid, atid, &string_attr);
+ CHECK(ret, H5I_INVALID_HID, "H5Awrite");
+
+ /* Close IDs */
+ ret = H5Sclose(asid);
+ CHECK(ret, H5I_INVALID_HID, "H5Sclose");
+
+ ret = H5Aclose(aid);
+ CHECK(ret, H5I_INVALID_HID, "H5Aclose");
+
+ ret = H5Gclose(gid);
+ CHECK(ret, H5I_INVALID_HID, "H5Gclose");
+
+ ret = H5Fclose(fid);
+ CHECK(ret, H5I_INVALID_HID, "H5Fclose");
+
+ ret = H5Tclose(atid);
+ CHECK(ret, H5I_INVALID_HID, "H5Tclose");
+
+ /* Start multiple threads and execute tts_attr_vlen_thread() for each thread */
+ for (i = 0; i < NUM_THREADS; i++) {
+ threads[i] = H5TS_create_thread(tts_attr_vlen_thread, NULL, NULL);
+ }
+
+ /* Wait for the threads to end */
+ for (i = 0; i < NUM_THREADS; i++)
+ H5TS_wait_for_thread(threads[i]);
+
+} /* end tts_attr_vlen() */
+
+/* Start execution for each thread */
+void *
+tts_attr_vlen_thread(void H5_ATTR_UNUSED *client_data)
+{
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t atid = H5I_INVALID_HID; /* Datatype ID for the attribute */
+ char * string_attr_check; /* The attribute data being read */
+ const char *string_attr = "2.0"; /* The expected attribute data */
+ herr_t ret; /* Return value */
+
+ /* Open the test file */
+ fid = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK(fid, H5I_INVALID_HID, "H5Fopen");
+
+ /* Open the group */
+ gid = H5Gopen2(fid, "/", H5P_DEFAULT);
+ CHECK(gid, H5I_INVALID_HID, "H5Gopen");
+
+ /* Open the attribte */
+ aid = H5Aopen(gid, "root_attr", H5P_DEFAULT);
+ CHECK(aid, H5I_INVALID_HID, "H5Aopen");
+
+ /* Get the attribute datatype */
+ atid = H5Aget_type(aid);
+ CHECK(atid, H5I_INVALID_HID, "H5Aget_type");
+
+ /* Read the attribute */
+ ret = H5Aread(aid, atid, &string_attr_check);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Verify the attribute data is as expected */
+ VERIFY_STR(string_attr_check, string_attr, "H5Aread");
+
+ /* Close IDs */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ ret = H5Tclose(atid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ return NULL;
+} /* end tts_attr_vlen_thread() */
+
+void
+cleanup_attr_vlen(void)
+{
+ HDunlink(FILENAME);
+}
+
+#endif /*H5_HAVE_THREADSAFE*/
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 786053e..acaa9d6 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -58,53 +58,53 @@ pthread_cond_t cond;
void
tts_cancel(void)
{
- pthread_attr_t attribute;
- hid_t dataset;
- int buffer;
- int ret;
+ pthread_attr_t attribute;
+ hid_t dataset;
+ int buffer;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* make thread scheduling global */
ret = pthread_attr_init(&attribute);
- assert(ret == 0);
+ HDassert(ret == 0);
#ifdef H5_HAVE_SYSTEM_SCOPE_THREADS
ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
- assert(ret == 0);
+ HDassert(ret == 0);
#endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */
/* Initialize mutex & condition variables */
ret = pthread_mutex_init(&mutex, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
ret = pthread_cond_init(&cond, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
/*
* Create a hdf5 file using H5F_ACC_TRUNC access, default file
* creation plist and default file access plist
*/
cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(cancel_file >= 0);
+ HDassert(cancel_file >= 0);
ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL);
- assert(ret == 0);
+ HDassert(ret == 0);
tts_cancel_barrier();
ret = pthread_cancel(childthread);
- assert(ret == 0);
+ HDassert(ret == 0);
dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT);
- assert(dataset >= 0);
+ HDassert(dataset >= 0);
ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer);
- assert(ret >= 0);
+ HDassert(ret >= 0);
if (buffer != 11)
TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer);
ret = H5Dclose(dataset);
- assert(ret >= 0);
+ HDassert(ret >= 0);
ret = H5Fclose(cancel_file);
- assert(ret >= 0);
+ HDassert(ret >= 0);
/* Destroy the thread attribute */
ret = pthread_attr_destroy(&attribute);
- assert(ret == 0);
+ HDassert(ret == 0);
} /* end tts_cancel() */
void *
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index cedafd0..6243f5e 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -140,7 +140,7 @@ tts_dcreate_creator(void *_thread_data)
hsize_t dimsf[1]; /* dataset dimensions */
struct thread_info thread_data;
- memcpy(&thread_data, _thread_data, sizeof(struct thread_info));
+ HDmemcpy(&thread_data, _thread_data, sizeof(struct thread_info));
/* define dataspace for dataset */
dimsf[0] = 1;
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index f92c65e..5863b67 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -72,7 +72,7 @@ tts_error(void)
/* Must initialize these at runtime */
expected_g[0].maj_num = H5E_DATASET;
- expected_g[0].min_num = H5E_CANTINIT;
+ expected_g[0].min_num = H5E_CANTCREATE;
expected_g[1].maj_num = H5E_VOL;
expected_g[1].min_num = H5E_CANTCREATE;
@@ -134,7 +134,8 @@ tts_error(void)
if (error_flag_g) {
TestErrPrintf(
"At least one thread reported a value that was different from the expected value\n");
- HDprintf("(Update this test if the error stack changed!)\n");
+ HDprintf(
+ "(Update the expected_g[] array in tts_error for this test if the error stack changed!)\n");
}
if (error_count_g != NUM_THREAD - 1)
@@ -241,7 +242,18 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE
return SUCCEED;
}
+ /* Unexpected error stack entry, print some info and set flag */
+ HDfprintf(stderr, "Unexpected error stack entry!\n");
+ HDfprintf(stderr, "Stack entry: %d\n", n);
+ HDfprintf(stderr,
+ "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID
+ ", line = %u, func = '%s', file = '%s', desc = '%s'\n",
+ err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name,
+ err_desc->desc);
+ HDfprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num,
+ expected_g[n].min_num);
error_flag_g = -1;
+
return SUCCEED;
}
diff --git a/test/ttsafe_rec_rw_lock.c b/test/ttsafe_rec_rw_lock.c
new file mode 100644
index 0000000..0597578
--- /dev/null
+++ b/test/ttsafe_rec_rw_lock.c
@@ -0,0 +1,1307 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/********************************************************************
+ *
+ * Test the correctness of the recursive R/W lock in the HDF5 library
+ * -------------------------------------------------------------
+ *
+ * Test the recursive R/W lock in isolation, using a combination of
+ * error return values and statistics collected by the recursive
+ * R/W lock to detect any failures.
+ *
+ * No file is created.
+ *
+ * Multiple threads are created, and allowed to compete for the lock.
+ * The number of threads, and the number of times they obtain the
+ * lock depends on the express test level.
+ *
+ * Created: Sept. 3, 2020
+ * Programmer: John Mainzer
+ *
+ ********************************************************************/
+
+#include "ttsafe.h"
+
+/* Include library header files */
+#include "H5ACprivate.h"
+
+#ifdef H5_USE_RECURSIVE_WRITER_LOCKS
+
+#ifdef H5_HAVE_THREADSAFE
+
+#define MAX_NUM_THREADS 32
+#define MAX_LOCK_CYCLES 1000000
+
+/* structure used to configure test threads in the recurive
+ * R/W/ lock tests.
+ */
+/***********************************************************************
+ *
+ * Structure rec_rw_lock_test_udata_t
+ *
+ * Arrays of instances of rec_rw_lock_test_udata_t are used to configure
+ * the threads used to test the recursive R/W lock, and to collect
+ * statistics on their behaviour. These statistics are aggregated and
+ * used to cross check the statistics collected by the recursive R/W
+ * lock proper.
+ *
+ * The fields of the structure are discussed below:
+ *
+ * rw_lock: Pointer to the recursive R/W under test.
+ *
+ * id: ID assigned to the target thread. Used primarily for
+ * sanity checking.
+ *
+ * target_rd_lock_cycles: The number of times the test thread is
+ * required to obtain and drop the read lock. Note
+ * that this value restricts the number of initial
+ * read locks only. Additional recursive locks are
+ * possible -- see max_recursive_lock_depth below.
+ *
+ * target_wr_lock_cycles: The number of times the test thread is
+ * required to obtain and drop the write lock. Note
+ * that this value restricts the number of initial
+ * write locks only. Additional recursive locks are
+ * possible -- see max_recursive_lock_depth below.
+ *
+ * max_recursive_lock_depth: Once a test thread gains a lock, it does
+ * random recursive leocks and unlocks until it happens
+ * to drop the lock. The max_recursive_lock_depth
+ * places an upper bound on the net number of locks.
+ * Any attempt exceed this limit is converted into
+ * an unlock.
+ *
+ * The remaining fields are used for statistics collection. They are
+ * thread specific versions of the fields of the same name in
+ * H5TS_rw_lock_stats_t. See the header comment for that
+ * structure (in H5TSprivate.h) for further details.
+ *
+ * JRM -- 9/3/20
+ *
+ ***********************************************************************/
+typedef struct rec_rw_lock_test_udata_t {
+
+ /* thread control fields */
+ H5TS_rw_lock_t *rw_lock;
+ int32_t id;
+ int32_t target_rd_lock_cycles;
+ int32_t target_wr_lock_cycles;
+ int32_t max_recursive_lock_depth;
+
+ /* thread stats fields */
+ int64_t read_locks_granted;
+ int64_t read_locks_released;
+ int64_t real_read_locks_granted;
+ int64_t real_read_locks_released;
+ int64_t write_locks_granted;
+ int64_t write_locks_released;
+ int64_t real_write_locks_granted;
+ int64_t real_write_locks_released;
+
+} rec_rw_lock_test_udata_t;
+
+void *tts_rw_lock_smoke_check_test_thread(void *_udata);
+
+/*
+ **********************************************************************
+ * tts_rec_rw_lock_smoke_check_1
+ *
+ * Single thread test to verify basic functionality and error
+ * rejection of the recursive R/W lock.
+ *
+ * 1) Initialize an instance of the recursive R/W lock.
+ *
+ * 2) Obtain a read lock.
+ *
+ * 3) Drop the read lock.
+ *
+ * 4) Verify the expected stats, and then reset them.
+ *
+ * 5) Obtain a read lock.
+ *
+ * 6) Obtain the read lock a second time.
+ *
+ * 7) Drop the read lock.
+ *
+ * 8) Drop the read lock a second time.
+ *
+ * 9) Verify the exptected stats, and then reset them.
+ *
+ * 10) Obtain a write lock.
+ *
+ * 11) Drop the write lock.
+ *
+ * 12) Verify the expected stats, and then reset them.
+ *
+ * 13) Obtain a write lock.
+ *
+ * 14) Obtain the write lock a second time.
+ *
+ * 15) Drop the write lock.
+ *
+ * 16) Drop the write lock a second time.
+ *
+ * 17) Verify the expected stats, and then reset them.
+ *
+ * 18) Obtain a write lock.
+ *
+ * 19) Attempt to obtain a read lock -- should fail.
+ *
+ * 20) Drop the write lock.
+ *
+ * 21) Obtain a read lock.
+ *
+ * 22) Attempt to obtain a write lock -- should fail.
+ *
+ * 23) Drop the read lock.
+ *
+ * 24) Verify the expected stats, and then reset them.
+ *
+ * 25) Shut down the recursive R/W lock.
+ *
+ * Creted Sept. 3. 2020.
+ *
+ * Programmer: John Mainzer
+ *
+ **********************************************************************
+ */
+void
+tts_rec_rw_lock_smoke_check_1(void)
+{
+ herr_t result;
+ struct H5TS_rw_lock_stats_t stats;
+ struct H5TS_rw_lock_t rec_rw_lock;
+
+ /* 1) Initialize an instance of the recursive R/W lock. */
+ result = H5TS_rw_lock_init(&rec_rw_lock, H5TS_RW_LOCK_POLICY_FAVOR_WRITERS);
+ CHECK_I(result, "H5TS_rw_lock_init");
+
+ /* 2) Obtain a read lock. */
+ result = H5TS_rw_rdlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 1");
+
+ /* 3) Drop the read lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 1");
+
+ /* 4) Verify the expected stats, and then reset them. */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 1");
+
+ result = H5TS_rw_lock_reset_stats(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_reset_stats -- 1");
+
+ /* clang-format makes this conditional unreadable, so turn it off. */
+ /* clang-format off */
+ if ( ( stats.read_locks_granted != 1 ) ||
+ ( stats.read_locks_released != 1 ) ||
+ ( stats.real_read_locks_granted != 1 ) ||
+ ( stats.real_read_locks_released != 1 ) ||
+ ( stats.max_read_locks != 1 ) ||
+ ( stats.max_read_lock_recursion_depth != 1 ) ||
+ ( stats.read_locks_delayed != 0 ) ||
+ ( stats.max_read_locks_pending != 0 ) ||
+ ( stats.write_locks_granted != 0 ) ||
+ ( stats.write_locks_released != 0 ) ||
+ ( stats.real_write_locks_granted != 0 ) ||
+ ( stats.real_write_locks_released != 0 ) ||
+ ( stats.max_write_locks != 0 ) ||
+ ( stats.max_write_lock_recursion_depth != 0 ) ||
+ ( stats.write_locks_delayed != 0 ) ||
+ ( stats.max_write_locks_pending != 0 ) ) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 1");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+ /* clang-format on */
+
+ /* 5) Obtain a read lock. */
+ result = H5TS_rw_rdlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 2");
+
+ /* 6) Obtain the read lock a second time. */
+ result = H5TS_rw_rdlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 3");
+
+ /* 7) Drop the read lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 2");
+
+ /* 8) Drop the read lock a second time. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 3");
+
+ /* 9) Verify the exptected stats, and then reset them. */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 2");
+
+ result = H5TS_rw_lock_reset_stats(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_reset_stats -- 2");
+
+ /* clang-format makes this conditional unreadable, so turn it off. */
+ /* clang-format off */
+ if ( ( stats.read_locks_granted != 2 ) ||
+ ( stats.read_locks_released != 2 ) ||
+ ( stats.real_read_locks_granted != 1 ) ||
+ ( stats.real_read_locks_released != 1 ) ||
+ ( stats.max_read_locks != 1 ) ||
+ ( stats.max_read_lock_recursion_depth != 2 ) ||
+ ( stats.read_locks_delayed != 0 ) ||
+ ( stats.max_read_locks_pending != 0 ) ||
+ ( stats.write_locks_granted != 0 ) ||
+ ( stats.write_locks_released != 0 ) ||
+ ( stats.real_write_locks_granted != 0 ) ||
+ ( stats.real_write_locks_released != 0 ) ||
+ ( stats.max_write_locks != 0 ) ||
+ ( stats.max_write_lock_recursion_depth != 0 ) ||
+ ( stats.write_locks_delayed != 0 ) ||
+ ( stats.max_write_locks_pending != 0 ) ) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 2");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+ /* clang-format on */
+
+ /* 10) Obtain a write lock. */
+ result = H5TS_rw_wrlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 1");
+
+ /* 11) Drop the write lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 4");
+
+ /* 12) Verify the expected stats, and then reset them. */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 3");
+
+ result = H5TS_rw_lock_reset_stats(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_reset_stats -- 3");
+
+ /* clang-format makes this conditional unreadable, so turn it off. */
+ /* clang-format off */
+ if ( ( stats.read_locks_granted != 0 ) ||
+ ( stats.read_locks_released != 0 ) ||
+ ( stats.real_read_locks_granted != 0 ) ||
+ ( stats.real_read_locks_released != 0 ) ||
+ ( stats.max_read_locks != 0 ) ||
+ ( stats.max_read_lock_recursion_depth != 0 ) ||
+ ( stats.read_locks_delayed != 0 ) ||
+ ( stats.max_read_locks_pending != 0 ) ||
+ ( stats.write_locks_granted != 1 ) ||
+ ( stats.write_locks_released != 1 ) ||
+ ( stats.real_write_locks_granted != 1 ) ||
+ ( stats.real_write_locks_released != 1 ) ||
+ ( stats.max_write_locks != 1 ) ||
+ ( stats.max_write_lock_recursion_depth != 1 ) ||
+ ( stats.write_locks_delayed != 0 ) ||
+ ( stats.max_write_locks_pending != 0 ) ) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 3");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+ /* clang-format on */
+
+ /* 13) Obtain a write lock. */
+ result = H5TS_rw_wrlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 2");
+
+ /* 14) Obtain the write lock a second time. */
+ result = H5TS_rw_wrlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 3");
+
+ /* 15) Drop the write lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 5");
+
+ /* 16) Drop the write lock a second time. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 6");
+
+ /* 17) Verify the expected stats, and then reset them. */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 4");
+
+ result = H5TS_rw_lock_reset_stats(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_reset_stats -- 4");
+
+ /* clang-format makes this conditional unreadable, so turn it off. */
+ /* clang-format off */
+ if ( ( stats.read_locks_granted != 0 ) ||
+ ( stats.read_locks_released != 0 ) ||
+ ( stats.real_read_locks_granted != 0 ) ||
+ ( stats.real_read_locks_released != 0 ) ||
+ ( stats.max_read_locks != 0 ) ||
+ ( stats.max_read_lock_recursion_depth != 0 ) ||
+ ( stats.read_locks_delayed != 0 ) ||
+ ( stats.max_read_locks_pending != 0 ) ||
+ ( stats.write_locks_granted != 2 ) ||
+ ( stats.write_locks_released != 2 ) ||
+ ( stats.real_write_locks_granted != 1 ) ||
+ ( stats.real_write_locks_released != 1 ) ||
+ ( stats.max_write_locks != 1 ) ||
+ ( stats.max_write_lock_recursion_depth != 2 ) ||
+ ( stats.write_locks_delayed != 0 ) ||
+ ( stats.max_write_locks_pending != 0 ) ) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 4");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+ /* clang-format on */
+
+ /* 18) Obtain a write lock. */
+ result = H5TS_rw_wrlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 4");
+
+ /* 19) Attempt to obtain a read lock -- should fail. */
+ result = H5TS_rw_rdlock(&rec_rw_lock);
+ VERIFY(result, FAIL, "H5TS_rw_rdlock -- 4");
+
+ /* 20) Drop the write lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 6");
+
+ /* 21) Obtain a read lock. */
+ result = H5TS_rw_rdlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 5");
+
+ /* 22) Attempt to obtain a write lock -- should fail. */
+ result = H5TS_rw_wrlock(&rec_rw_lock);
+ VERIFY(result, FAIL, "H5TS_rw_wrlock -- 5");
+
+ /* 23) Drop the read lock. */
+ result = H5TS_rw_unlock(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 6");
+
+ /* 24) Verify the expected stats, and then reset them. */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 5");
+
+ result = H5TS_rw_lock_reset_stats(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_reset_stats -- 5");
+
+ /* clang-format makes this conditional unreadable, so turn it off. */
+ /* clang-format off */
+ if ( ( stats.read_locks_granted != 1 ) ||
+ ( stats.read_locks_released != 1 ) ||
+ ( stats.real_read_locks_granted != 1 ) ||
+ ( stats.real_read_locks_released != 1 ) ||
+ ( stats.max_read_locks != 1 ) ||
+ ( stats.max_read_lock_recursion_depth != 1 ) ||
+ ( stats.read_locks_delayed != 0 ) ||
+ ( stats.max_read_locks_pending != 0 ) ||
+ ( stats.write_locks_granted != 1 ) ||
+ ( stats.write_locks_released != 1 ) ||
+ ( stats.real_write_locks_granted != 1 ) ||
+ ( stats.real_write_locks_released != 1 ) ||
+ ( stats.max_write_locks != 1 ) ||
+ ( stats.max_write_lock_recursion_depth != 1 ) ||
+ ( stats.write_locks_delayed != 0 ) ||
+ ( stats.max_write_locks_pending != 0 ) ) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 5");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+ /* clang-format on */
+
+ /* 25) Shut down the recursive R/W lock. */
+ result = H5TS_rw_lock_destroy(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_destroy");
+
+ return;
+
+} /* end tts_rec_rw_lock_smoke_check_1() */
+
+void
+cleanup_rec_rw_lock_smoke_check_1(void)
+{
+ /* nothing to do */
+ return;
+}
+
+/*
+ **********************************************************************
+ * tts_rw_lock_smoke_check_test_thread
+ *
+ * Perform a sequence of recursive read and/or write locks on the
+ * target recursive R/W lock as directed by the supplied user data.
+ * Record all operations in the user data for later cross checking
+ * with the statistics maintained by the recursive R/W lock.
+ *
+ * Note that while number of read and/or write locks is fixed, the
+ * number of recursive lock and unlock calls is random, as is the
+ * order of read and write locks if both are enabled.
+ *
+ * Creted Sept. 3. 2020.
+ *
+ * Programmer: John Mainzer
+ *
+ **********************************************************************
+ */
+
+void *
+tts_rw_lock_smoke_check_test_thread(void *_udata)
+{
+ hbool_t read;
+ int32_t rec_lock_depth = 0;
+ int32_t max_rec_lock_depth;
+ int32_t rd_locks_remaining;
+ int32_t wr_locks_remaining;
+ herr_t result;
+ H5TS_rw_lock_t * rw_lock;
+ struct rec_rw_lock_test_udata_t *udata;
+
+ HDassert(_udata);
+
+ udata = (struct rec_rw_lock_test_udata_t *)_udata;
+
+ rd_locks_remaining = udata->target_rd_lock_cycles;
+ wr_locks_remaining = udata->target_wr_lock_cycles;
+ max_rec_lock_depth = udata->max_recursive_lock_depth;
+ rw_lock = udata->rw_lock;
+
+ while ((rd_locks_remaining > 0) || (wr_locks_remaining > 0)) {
+
+ if (wr_locks_remaining == 0) {
+
+ read = TRUE;
+ }
+ else if (rd_locks_remaining == 0) {
+
+ read = FALSE;
+ }
+ else {
+
+ if ((HDrand() % 2) == 0) {
+
+ read = TRUE;
+ }
+ else {
+
+ read = FALSE;
+ }
+ }
+
+ if (read) {
+
+ result = H5TS_rw_rdlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 1");
+
+ udata->read_locks_granted++;
+ udata->real_read_locks_granted++;
+ rd_locks_remaining--;
+ rec_lock_depth = 1;
+
+ while (rec_lock_depth > 0) {
+
+ if ((rec_lock_depth >= max_rec_lock_depth) || ((HDrand() % 2) == 0)) {
+
+ result = H5TS_rw_unlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 1");
+
+ rec_lock_depth--;
+ udata->read_locks_released++;
+ }
+ else {
+
+ result = H5TS_rw_rdlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_rdlock -- 2");
+
+ rec_lock_depth++;
+ udata->read_locks_granted++;
+ }
+ }
+
+ udata->real_read_locks_released++;
+ }
+ else {
+
+ result = H5TS_rw_wrlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 1");
+
+ udata->write_locks_granted++;
+ udata->real_write_locks_granted++;
+ wr_locks_remaining--;
+ rec_lock_depth = 1;
+
+ while (rec_lock_depth > 0) {
+
+ if ((rec_lock_depth >= max_rec_lock_depth) || ((HDrand() % 2) == 0)) {
+
+ result = H5TS_rw_unlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_unlock -- 2");
+
+ rec_lock_depth--;
+ udata->write_locks_released++;
+ }
+ else {
+
+ result = H5TS_rw_wrlock(rw_lock);
+ CHECK_I(result, "H5TS_rw_wrlock -- 2");
+
+ rec_lock_depth++;
+ udata->write_locks_granted++;
+ }
+ }
+
+ udata->real_write_locks_released++;
+ }
+ }
+
+ return NULL;
+
+} /* end tts_rw_lock_smoke_check_test_thread() */
+
+/*
+ **********************************************************************
+ * tts_rec_rw_lock_smoke_check_2 -- mob of readers
+ *
+ * Multi-thread test to check management of multiple readers ONLY by
+ * the recursive R/W lock. Test proceeds as follows:
+ *
+ * 1) Initialize an instance of the recursive R/W lock.
+ *
+ * 2) Setup the user data to be passed to each reader test thread.
+ *
+ * 3) Create the reader threads, each with its own user data.
+ * Activities of the reader threads is discussed in the header
+ * comment to tts_rw_lock_smoke_check_test_thread().
+ *
+ * 4) Wait for all threads to complete.
+ *
+ * 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read locks and un-lock.
+ *
+ * 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ *
+ * 7) Shut down the recursive R/W lock.
+ *
+ * The reader threads obtain and drop the read lock a specified
+ * number of times. Once a reader has a read lock, it does random
+ * recursive read locks / unlocks until drops the read lock, and then
+ * repeats the process until the spcified number of read locks have
+ * been acquired and dropped.
+ *
+ * Creted Sept. 3. 2020.
+ *
+ * Programmer: John Mainzer
+ *
+ **********************************************************************
+ */
+
+void
+tts_rec_rw_lock_smoke_check_2(void)
+{
+ hbool_t verbose = FALSE;
+ herr_t result;
+ int express_test;
+ int i;
+ int num_threads = MAX_NUM_THREADS;
+ int lock_cycles = MAX_LOCK_CYCLES;
+ int32_t total_target_rd_lock_cycles = 0;
+ int32_t total_target_wr_lock_cycles = 0;
+ H5TS_thread_t threads[MAX_NUM_THREADS];
+ struct rec_rw_lock_test_udata_t *udata = NULL;
+ struct H5TS_rw_lock_stats_t stats;
+ struct H5TS_rw_lock_stats_t expected = {/* Initialize all fields to zero -- we will construct
+ * the expected stats from the thread udata after
+ * completion.
+ */
+ /* read_locks_granted = */ 0,
+ /* read_locks_released = */ 0,
+ /* real_read_locks_granted = */ 0,
+ /* real_read_locks_released = */ 0,
+ /* max_read_locks = */ 0,
+ /* max_read_lock_recursion_depth = */ 0,
+ /* read_locks_delayed = */ 0,
+ /* max_read_locks_pending = */ 0,
+ /* write_locks_granted = */ 0,
+ /* write_locks_released = */ 0,
+ /* real_write_locks_granted = */ 0,
+ /* real_write_locks_released = */ 0,
+ /* max_write_locks = */ 0,
+ /* max_write_lock_recursion_depth = */ 0,
+ /* write_locks_delayed = */ 0,
+ /* max_write_locks_pending = */ 0};
+ struct H5TS_rw_lock_t rec_rw_lock;
+
+ /* Allocate the udata */
+ udata = HDmalloc(sizeof(*udata) * MAX_NUM_THREADS);
+
+ if (udata == NULL) {
+
+ TestErrPrintf("thread udata allocation failed.\n");
+
+ /* We can't do anything without the udata, so just return */
+ return;
+ }
+
+ express_test = GetTestExpress();
+
+ if (express_test >= 1) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 2) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 3) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ /* 1) Initialize an instance of the recursive R/W lock. */
+ result = H5TS_rw_lock_init(&rec_rw_lock, H5TS_RW_LOCK_POLICY_FAVOR_WRITERS);
+ CHECK_I(result, "H5TS_rw_lock_init");
+
+ /* 2) Setup the user data to be passed to each reader test thread. */
+ for (i = 0; i < MAX_NUM_THREADS; i++) {
+
+ udata[i].rw_lock = &rec_rw_lock;
+ udata[i].id = i;
+ udata[i].target_rd_lock_cycles = lock_cycles;
+ udata[i].target_wr_lock_cycles = 0;
+ udata[i].max_recursive_lock_depth = 10;
+ udata[i].read_locks_granted = 0;
+ udata[i].read_locks_released = 0;
+ udata[i].real_read_locks_granted = 0;
+ udata[i].real_read_locks_released = 0;
+ udata[i].write_locks_granted = 0;
+ udata[i].write_locks_released = 0;
+ udata[i].real_write_locks_granted = 0;
+ udata[i].real_write_locks_released = 0;
+ }
+
+ /* 3) Create the reader threads, each with its own user data. */
+ for (i = 0; i < num_threads; i++) {
+
+ threads[i] = H5TS_create_thread(tts_rw_lock_smoke_check_test_thread, NULL, &(udata[i]));
+ }
+
+ /* 4) Wait for all threads to complete. */
+ for (i = 0; i < num_threads; i++) {
+
+ H5TS_wait_for_thread(threads[i]);
+ }
+
+ /* 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read locks and un-lock.
+ *
+ * First, tally up the lock entries and exits from the test threads,
+ * and store this data in the expected recursive R/W/ lock stats..
+ * In passing, verify that each thread has done the expected number
+ * of locks and unlocks. Do these as asserts -- will run checks on
+ * aggregate data shortly.
+ */
+
+ for (i = 0; i < num_threads; i++) {
+
+ HDassert(udata[i].id == i);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_granted);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_released);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_granted);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_released);
+
+ total_target_rd_lock_cycles += udata[i].target_rd_lock_cycles;
+ total_target_wr_lock_cycles += udata[i].target_wr_lock_cycles;
+
+ expected.read_locks_granted += udata[i].read_locks_granted;
+ expected.read_locks_released += udata[i].read_locks_released;
+ expected.real_read_locks_granted += udata[i].real_read_locks_granted;
+ expected.real_read_locks_released += udata[i].real_read_locks_released;
+ expected.write_locks_granted += udata[i].write_locks_granted;
+ expected.write_locks_released += udata[i].write_locks_released;
+ expected.real_write_locks_granted += udata[i].real_write_locks_granted;
+ expected.real_write_locks_released += udata[i].real_write_locks_released;
+ }
+
+ /* Verify that the threads executed the expected number of read and write
+ * lock cycles. If they didn't, some thread probably encountered an error
+ * and exited early.
+ */
+ if ((total_target_rd_lock_cycles != expected.real_read_locks_granted) ||
+ (total_target_rd_lock_cycles != expected.real_read_locks_released) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_granted) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_released)) {
+
+ TestErrPrintf("Threads reported unexpected number of locks/unlocks.\n");
+ }
+
+ /* initialize remaining non-zero fields in the expected stats */
+ expected.max_read_locks = num_threads;
+ expected.max_read_lock_recursion_depth = 10;
+
+ /* 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ */
+
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 1");
+
+ /* turn off clang-format for readability */
+ /* clang-format off */
+ if ((stats.read_locks_granted != expected.read_locks_granted) ||
+ (stats.read_locks_released != expected.read_locks_released) ||
+ (stats.real_read_locks_granted != expected.real_read_locks_granted) ||
+ (stats.real_read_locks_released != expected.real_read_locks_released) ||
+ (stats.max_read_locks > expected.max_read_locks) ||
+ (stats.max_read_locks < 1) ||
+ (stats.max_read_lock_recursion_depth > expected.max_read_lock_recursion_depth) ||
+ (stats.max_read_lock_recursion_depth < 1) ||
+ (stats.read_locks_delayed != expected.read_locks_delayed) ||
+ (stats.max_read_locks_pending != expected.max_read_locks_pending) ||
+ (stats.write_locks_granted != expected.write_locks_granted) ||
+ (stats.write_locks_released != expected.write_locks_released) ||
+ (stats.real_write_locks_granted != expected.real_write_locks_granted) ||
+ (stats.real_write_locks_released != expected.real_write_locks_released) ||
+ (stats.max_write_locks != expected.max_write_locks) ||
+ (stats.max_write_lock_recursion_depth != expected.max_write_lock_recursion_depth) ||
+ (stats.write_locks_delayed != expected.write_locks_delayed) ||
+ (stats.max_write_locks_pending != expected.max_write_locks_pending)) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 1");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ H5TS_rw_lock_print_stats("Expected stats", &expected);
+ }
+ /* clang-format on */
+
+ if (verbose) {
+
+ H5TS_rw_lock_print_stats("mob of readers stats", &stats);
+ }
+
+ /* 7) Shut down the recursive R/W lock. */
+ result = H5TS_rw_lock_destroy(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_destroy");
+
+ /* discard the udata if it exists */
+ if (udata) {
+
+ HDfree(udata);
+ }
+
+ return;
+
+} /* end tts_rec_rw_lock_smoke_check_2() */
+
+void
+cleanup_rec_rw_lock_smoke_check_2(void)
+{
+ /* nothing to do */
+ return;
+}
+
+/*
+ **********************************************************************
+ * tts_rec_rw_lock_smoke_check_3 -- mob of writers
+ *
+ * Multi-thread test to check management of multiple writers ONLY by
+ * the recursive R/W lock. Test proceeds as follows:
+ *
+ * 1) Initialize an instance of the recursive R/W lock.
+ *
+ * 2) Setup the user data to be passed to each writer test thread.
+ *
+ * 3) Create the writer threads, each with its own user data.
+ * Activities of the writer threads is discussed in the header
+ * comment to tts_rw_lock_smoke_check_test_thread().
+ *
+ * 4) Wait for all threads to complete.
+ *
+ * 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read locks and un-lock.
+ *
+ * 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ *
+ * 7) Shut down the recursive R/W lock.
+ *
+ * The writer threads obtain and drop the read lock a specified
+ * number of times. Once a writeer has a write lock, it does random
+ * recursive write locks / unlocks until drops the write lock, and then
+ * repeats the process until the spcified number of write locks have
+ * been acquired and dropped.
+ *
+ * Creted Sept. 3. 2020.
+ *
+ * Programmer: John Mainzer
+ *
+ **********************************************************************
+ */
+
+void
+tts_rec_rw_lock_smoke_check_3(void)
+{
+ hbool_t verbose = FALSE;
+ herr_t result;
+ int i;
+ int express_test;
+ int num_threads = MAX_NUM_THREADS;
+ int lock_cycles = MAX_LOCK_CYCLES;
+ int32_t total_target_rd_lock_cycles = 0;
+ int32_t total_target_wr_lock_cycles = 0;
+ H5TS_thread_t threads[MAX_NUM_THREADS];
+ struct rec_rw_lock_test_udata_t *udata = NULL;
+ struct H5TS_rw_lock_stats_t stats;
+ struct H5TS_rw_lock_stats_t expected = {/* Initialize all fields to zero -- we will construct
+ * the expected stats from the thread udata after
+ * completion.
+ */
+ /* read_locks_granted = */ 0,
+ /* read_locks_released = */ 0,
+ /* real_read_locks_granted = */ 0,
+ /* real_read_locks_released = */ 0,
+ /* max_read_locks = */ 0,
+ /* max_read_lock_recursion_depth = */ 0,
+ /* read_locks_delayed = */ 0,
+ /* max_read_locks_pending = */ 0,
+ /* write_locks_granted = */ 0,
+ /* write_locks_released = */ 0,
+ /* real_write_locks_granted = */ 0,
+ /* real_write_locks_released = */ 0,
+ /* max_write_locks = */ 0,
+ /* max_write_lock_recursion_depth = */ 0,
+ /* write_locks_delayed = */ 0,
+ /* max_write_locks_pending = */ 0};
+ struct H5TS_rw_lock_t rec_rw_lock;
+
+ /* Allocate the udata */
+ udata = HDmalloc(sizeof(*udata) * MAX_NUM_THREADS);
+
+ if (udata == NULL) {
+
+ TestErrPrintf("thread udata allocation failed.\n");
+
+ /* We can't do anything without the udata, so just return */
+ return;
+ }
+
+ express_test = GetTestExpress();
+
+ if (express_test >= 1) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 2) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 3) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ /* 1) Initialize an instance of the recursive R/W lock. */
+ result = H5TS_rw_lock_init(&rec_rw_lock, H5TS_RW_LOCK_POLICY_FAVOR_WRITERS);
+ CHECK_I(result, "H5TS_rw_lock_init");
+
+ /* 2) Setup the user data to be passed to each writer test thread. */
+ for (i = 0; i < MAX_NUM_THREADS; i++) {
+
+ udata[i].rw_lock = &rec_rw_lock;
+ udata[i].id = i;
+ udata[i].target_rd_lock_cycles = 0;
+ udata[i].target_wr_lock_cycles = lock_cycles;
+ udata[i].max_recursive_lock_depth = 10;
+ udata[i].read_locks_granted = 0;
+ udata[i].read_locks_released = 0;
+ udata[i].real_read_locks_granted = 0;
+ udata[i].real_read_locks_released = 0;
+ udata[i].write_locks_granted = 0;
+ udata[i].write_locks_released = 0;
+ udata[i].real_write_locks_granted = 0;
+ udata[i].real_write_locks_released = 0;
+ }
+
+ /* 3) Create the writer threads, each with its own user data. */
+ for (i = 0; i < num_threads; i++) {
+
+ threads[i] = H5TS_create_thread(tts_rw_lock_smoke_check_test_thread, NULL, &(udata[i]));
+ }
+
+ /* 4) Wait for all threads to complete. */
+ for (i = 0; i < num_threads; i++) {
+
+ H5TS_wait_for_thread(threads[i]);
+ }
+
+ /* 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read locks and un-lock.
+ *
+ * First, tally up the lock entries and exits from the test threads,
+ * and store this data in the expected recursive R/W/ lock stats..
+ * In passing, verify that each thread has done the expected number
+ * of locks and unlocks. Do these as asserts -- will run checks on
+ * aggregate data shortly.
+ */
+
+ for (i = 0; i < num_threads; i++) {
+
+ HDassert(udata[i].id == i);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_granted);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_released);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_granted);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_released);
+
+ total_target_rd_lock_cycles += udata[i].target_rd_lock_cycles;
+ total_target_wr_lock_cycles += udata[i].target_wr_lock_cycles;
+
+ expected.read_locks_granted += udata[i].read_locks_granted;
+ expected.read_locks_released += udata[i].read_locks_released;
+ expected.real_read_locks_granted += udata[i].real_read_locks_granted;
+ expected.real_read_locks_released += udata[i].real_read_locks_released;
+ expected.write_locks_granted += udata[i].write_locks_granted;
+ expected.write_locks_released += udata[i].write_locks_released;
+ expected.real_write_locks_granted += udata[i].real_write_locks_granted;
+ expected.real_write_locks_released += udata[i].real_write_locks_released;
+ }
+
+ /* Verify that the threads executed the expected number of read and write
+ * lock cycles. If they didn't, some thread probably encountered an error
+ * and exited early.
+ */
+ if ((total_target_rd_lock_cycles != expected.real_read_locks_granted) ||
+ (total_target_rd_lock_cycles != expected.real_read_locks_released) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_granted) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_released)) {
+
+ TestErrPrintf("Threads reported unexpected number of locks/unlocks.\n");
+ }
+
+ /* initialize remaining non-zero fields in the expected stats */
+ expected.max_write_locks = 1;
+ expected.max_write_lock_recursion_depth = 10;
+ expected.max_write_locks_pending = num_threads - 1;
+
+ /* 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 1");
+
+ /* turn off clang-format for readability */
+ /* clang-format off */
+ if ((stats.read_locks_granted != expected.read_locks_granted) ||
+ (stats.read_locks_released != expected.read_locks_released) ||
+ (stats.real_read_locks_granted != expected.real_read_locks_granted) ||
+ (stats.real_read_locks_released != expected.real_read_locks_released) ||
+ (stats.max_read_locks != expected.max_read_locks) ||
+ (stats.max_read_lock_recursion_depth != expected.max_read_lock_recursion_depth) ||
+ (stats.read_locks_delayed != expected.read_locks_delayed) ||
+ (stats.max_read_locks_pending != expected.max_read_locks_pending) ||
+ (stats.write_locks_granted != expected.write_locks_granted) ||
+ (stats.write_locks_released != expected.write_locks_released) ||
+ (stats.real_write_locks_granted != expected.real_write_locks_granted) ||
+ (stats.real_write_locks_released != expected.real_write_locks_released) ||
+ (stats.max_write_locks != expected.max_write_locks) ||
+ (stats.max_write_lock_recursion_depth > expected.max_write_lock_recursion_depth) ||
+ (stats.max_write_lock_recursion_depth < 1) ||
+ (stats.write_locks_delayed < expected.write_locks_delayed) ||
+ (stats.max_write_locks_pending > expected.max_write_locks_pending)) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 1");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ H5TS_rw_lock_print_stats("Expected stats", &expected);
+ }
+ /* clang-format on */
+
+ if (verbose) {
+
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+
+ /* 7) Shut down the recursive R/W lock. */
+ result = H5TS_rw_lock_destroy(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_destroy");
+
+ /* discard the udata if it exists */
+ if (udata) {
+
+ HDfree(udata);
+ }
+
+ return;
+
+} /* end tts_rec_rw_lock_smoke_check_3() */
+
+void
+cleanup_rec_rw_lock_smoke_check_3(void)
+{
+ /* nothing to do */
+ return;
+}
+
+/*
+ **********************************************************************
+ * tts_rec_rw_lock_smoke_check_4 -- mixed mob
+ *
+ * Multi-thread test to check management of multiple readers and
+ * writers by the recursive R/W lock. Test proceeds as follows:
+ *
+ * 1) Initialize an instance of the recursive R/W lock.
+ *
+ * 2) Setup the user data to be passed to each writer test thread.
+ *
+ * 3) Create the reader / writer threads, each with its own user data.
+ * Activities of the reader / writer threads is discussed in the
+ * header comment to tts_rw_lock_smoke_check_test_thread().
+ *
+ * 4) Wait for all threads to complete.
+ *
+ * 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read & write locks and
+ * un-lock.
+ *
+ * 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ *
+ * 7) Shut down the recursive R/W lock.
+ *
+ * The reader / writer threads obtain and drop the read or write
+ * locks a specified number of times. Once a thread has a lock, it
+ * does random recursive locks / unlocks until drops the lock, and then
+ * repeats the process until the spcified number of locks have
+ * been acquired and dropped.
+ *
+ * Creted Sept. 3. 2020.
+ *
+ * Programmer: John Mainzer
+ *
+ **********************************************************************
+ */
+
+void
+tts_rec_rw_lock_smoke_check_4(void)
+{
+ hbool_t verbose = FALSE;
+ herr_t result;
+ int i;
+ int express_test;
+ int num_threads = MAX_NUM_THREADS;
+ int lock_cycles = MAX_LOCK_CYCLES;
+ int32_t total_target_rd_lock_cycles = 0;
+ int32_t total_target_wr_lock_cycles = 0;
+ H5TS_thread_t threads[MAX_NUM_THREADS];
+ struct rec_rw_lock_test_udata_t *udata = NULL;
+ struct H5TS_rw_lock_stats_t stats;
+ struct H5TS_rw_lock_stats_t expected = {/* Initialize all fields to zero -- we will construct
+ * the expected stats from the thread udata after
+ * completion.
+ */
+ /* read_locks_granted = */ 0,
+ /* read_locks_released = */ 0,
+ /* real_read_locks_granted = */ 0,
+ /* real_read_locks_released = */ 0,
+ /* max_read_locks = */ 0,
+ /* max_read_lock_recursion_depth = */ 0,
+ /* read_locks_delayed = */ 0,
+ /* max_read_locks_pending = */ 0,
+ /* write_locks_granted = */ 0,
+ /* write_locks_released = */ 0,
+ /* real_write_locks_granted = */ 0,
+ /* real_write_locks_released = */ 0,
+ /* max_write_locks = */ 0,
+ /* max_write_lock_recursion_depth = */ 0,
+ /* write_locks_delayed = */ 0,
+ /* max_write_locks_pending = */ 0};
+ struct H5TS_rw_lock_t rec_rw_lock;
+
+ /* Allocate the udata */
+ udata = HDmalloc(sizeof(*udata) * MAX_NUM_THREADS);
+
+ if (udata == NULL) {
+
+ TestErrPrintf("thread udata allocation failed.\n");
+
+ /* We can't do anything without the udata, so just return */
+ return;
+ }
+
+ express_test = GetTestExpress();
+
+ if (express_test >= 1) {
+
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 2) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ if (express_test >= 3) {
+
+ num_threads /= 2;
+ lock_cycles /= 10;
+ }
+
+ /* 1) Initialize an instance of the recursive R/W lock. */
+ result = H5TS_rw_lock_init(&rec_rw_lock, H5TS_RW_LOCK_POLICY_FAVOR_WRITERS);
+ CHECK_I(result, "H5TS_rw_lock_init");
+
+ /* 2) Setup the user data to be passed to each writer test thread. */
+ for (i = 0; i < MAX_NUM_THREADS; i++) {
+
+ udata[i].rw_lock = &rec_rw_lock;
+ udata[i].id = i;
+ udata[i].target_rd_lock_cycles = lock_cycles;
+ udata[i].target_wr_lock_cycles = lock_cycles;
+ udata[i].max_recursive_lock_depth = 10;
+ udata[i].read_locks_granted = 0;
+ udata[i].read_locks_released = 0;
+ udata[i].real_read_locks_granted = 0;
+ udata[i].real_read_locks_released = 0;
+ udata[i].write_locks_granted = 0;
+ udata[i].write_locks_released = 0;
+ udata[i].real_write_locks_granted = 0;
+ udata[i].real_write_locks_released = 0;
+ }
+
+ /* 3) Create the reader threads, each with its own user data. */
+ for (i = 0; i < num_threads; i++) {
+
+ threads[i] = H5TS_create_thread(tts_rw_lock_smoke_check_test_thread, NULL, &(udata[i]));
+ }
+
+ /* 4) Wait for all threads to complete. */
+ for (i = 0; i < num_threads; i++) {
+
+ H5TS_wait_for_thread(threads[i]);
+ }
+
+ /* 5) Examine the user data from the threads, to determine the
+ * total number of real and recursive read locks and un-lock.
+ *
+ * First, tally up the lock entries and exits from the test threads,
+ * and store this data in the expected recursive R/W/ lock stats..
+ * In passing, verify that each thread has done the expected number
+ * of locks and unlocks. Do these as asserts -- will run checks on
+ * aggregate data shortly.
+ */
+
+ for (i = 0; i < num_threads; i++) {
+
+ HDassert(udata[i].id == i);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_granted);
+ HDassert(udata[i].target_rd_lock_cycles == udata[i].real_read_locks_released);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_granted);
+ HDassert(udata[i].target_wr_lock_cycles == udata[i].real_write_locks_released);
+
+ total_target_rd_lock_cycles += udata[i].target_rd_lock_cycles;
+ total_target_wr_lock_cycles += udata[i].target_wr_lock_cycles;
+
+ expected.read_locks_granted += udata[i].read_locks_granted;
+ expected.read_locks_released += udata[i].read_locks_released;
+ expected.real_read_locks_granted += udata[i].real_read_locks_granted;
+ expected.real_read_locks_released += udata[i].real_read_locks_released;
+ expected.write_locks_granted += udata[i].write_locks_granted;
+ expected.write_locks_released += udata[i].write_locks_released;
+ expected.real_write_locks_granted += udata[i].real_write_locks_granted;
+ expected.real_write_locks_released += udata[i].real_write_locks_released;
+ }
+
+ /* Verify that the threads executed the expected number of read and write
+ * lock cycles. If they didn't, some thread probably encountered an error
+ * and exited early.
+ */
+ if ((total_target_rd_lock_cycles != expected.real_read_locks_granted) ||
+ (total_target_rd_lock_cycles != expected.real_read_locks_released) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_granted) ||
+ (total_target_wr_lock_cycles != expected.real_write_locks_released)) {
+
+ TestErrPrintf("Threads reported unexpected number of locks/unlocks.\n");
+ }
+
+ /* initialize remaining non-zero fields in the expected stats */
+ expected.max_read_locks = num_threads;
+ expected.max_read_lock_recursion_depth = 10;
+ expected.max_read_locks_pending = num_threads - 1;
+ expected.max_write_locks = 1;
+ expected.max_write_lock_recursion_depth = 10;
+ expected.max_write_locks_pending = num_threads - 1;
+
+ /* 6) Obtain the stats from the recursive R/W lock, and compare
+ * with the data gathered above.
+ */
+ result = H5TS_rw_lock_get_stats(&rec_rw_lock, &stats);
+ CHECK_I(result, "H5TS_rw_lock_get_stats -- 1");
+
+ /* turn off clang-format for readability */
+ /* clang-format off */
+ if ((stats.read_locks_granted != expected.read_locks_granted) ||
+ (stats.read_locks_released != expected.read_locks_released) ||
+ (stats.real_read_locks_granted != expected.real_read_locks_granted) ||
+ (stats.real_read_locks_released != expected.real_read_locks_released) ||
+ (stats.max_read_locks > expected.max_read_locks) ||
+ (stats.max_read_locks < 1) ||
+ (stats.max_read_lock_recursion_depth > expected.max_read_lock_recursion_depth) ||
+ (stats.read_locks_delayed < expected.read_locks_delayed) ||
+ (stats.max_read_locks_pending > expected.max_read_locks_pending) ||
+ (stats.write_locks_granted != expected.write_locks_granted) ||
+ (stats.write_locks_released != expected.write_locks_released) ||
+ (stats.real_write_locks_granted != expected.real_write_locks_granted) ||
+ (stats.real_write_locks_released != expected.real_write_locks_released) ||
+ (stats.max_write_locks != expected.max_write_locks) ||
+ (stats.max_write_lock_recursion_depth > expected.max_write_lock_recursion_depth) ||
+ (stats.max_write_lock_recursion_depth < 1) ||
+ (stats.write_locks_delayed < expected.write_locks_delayed) ||
+ (stats.max_write_locks_pending > expected.max_write_locks_pending)) {
+
+ TestErrPrintf("Unexpected recursive R/W lock stats -- 1");
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ H5TS_rw_lock_print_stats("Expected stats", &expected);
+ }
+ /* clang-format on */
+
+ if (verbose) {
+
+ H5TS_rw_lock_print_stats("Actual stats", &stats);
+ }
+
+ /* 7) Shut down the recursive R/W lock. */
+ result = H5TS_rw_lock_destroy(&rec_rw_lock);
+ CHECK_I(result, "H5TS_rw_lock_destroy");
+
+ /* discard the udata if it exists */
+ if (udata) {
+
+ HDfree(udata);
+ }
+
+ return;
+
+} /* end tts_rec_rw_lock_smoke_check_4() */
+
+void
+cleanup_rec_rw_lock_smoke_check_4(void)
+{
+ /* nothing to do */
+ return;
+}
+
+#endif /* H5_USE_RECURSIVE_WRITER_LOCKS */
+
+#endif /*H5_HAVE_THREADSAFE*/
diff --git a/test/ttst.c b/test/ttst.c
deleted file mode 100644
index 4d6cdf0..0000000
--- a/test/ttst.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- FILE
- tst.c
- Test HDF Ternary Search Tree (tst) routines.
-
- REMARKS
-
- DESIGN
-
- BUGS/LIMITATIONS
-
- EXPORTED ROUTINES
-
- AUTHOR
- Quincey Koziol
-
- MODIFICATION HISTORY
- 12/9/02 - Started coding
- */
-
-#include "testhdf5.h"
-#include "H5STprivate.h"
-
-/* Test words to insert into s TST */
-static const char *words[] = {
- "We", "hold", "these", "truths", "to", "be", "self-evident,",
- "that", "all", "men", "are", "created", "equal,", "that",
- "they", "are", "endowed", "by", "their", "Creator", "with",
- "certain", "unalienable", "Rights,", "that", "among", "these", "are",
- "Life,", "Liberty", "and", "the", "pursuit", "of", "Happiness."};
-/* Number of words in test words set */
-size_t num_words;
-
-/* Number of unique words in test word set */
-size_t num_uniq_words;
-/* Unique words in test word set */
-char **uniq_words;
-/* Randomized order version of words in test word set */
-char **rand_uniq_words;
-/* Sorted order version of words in test word set */
-char **sort_uniq_words;
-
-static int
-tst_strcmp(const void *_s1, const void *_s2)
-{
- return (HDstrcmp(*(const char *const *)_s1, *(const char *const *)_s2));
-}
-
-/****************************************************************
-**
-** test_tst_init(): Test basic H5ST (ternary search tree) selection code.
-** Initialize data for TST testing
-**
-****************************************************************/
-static void
-test_tst_init(void)
-{
- time_t curr_time; /* Current time, for seeding random number generator */
- char * tmp_word; /* Temporary pointer to word in word set */
- size_t u, v, w; /* Local index variables */
-
- /* Compute the number of words in the test set */
- num_words = sizeof(words) / sizeof(words[0]);
-
- /* Determine the number of unique words in test set */
- /* (Not particularly efficient, be careful if many words are added to set) */
- num_uniq_words = 0;
- for (u = 0; u < num_words; u++) {
- /* Assume word is unique */
- num_uniq_words++;
- for (v = 0; v < u; v++)
- /* If word is already found in words looked at, decrement unique count */
- if (!HDstrcmp(words[u], words[v])) {
- num_uniq_words--;
- break;
- } /* end if */
- } /* end for */
-
- /* Allocate space for the array of unique words */
- uniq_words = (char **)HDmalloc(sizeof(char *) * num_uniq_words);
-
- /* Allocate space for the array of randomized order unique words also */
- rand_uniq_words = (char **)HDmalloc(sizeof(char *) * num_uniq_words);
-
- /* Allocate space for the array of sorted order unique words also */
- sort_uniq_words = (char **)HDmalloc(sizeof(char *) * num_uniq_words);
-
- /* Insert unique words from test set into unique word set */
- w = 0;
- for (u = 0; u < num_words; u++) {
- /* Assume word is unique */
- tmp_word = (char *)words[u];
- for (v = 0; v < u; v++)
- /* If word is already found in words looked at, decrement unique count */
- if (!HDstrcmp(words[u], words[v])) {
- tmp_word = NULL;
- break;
- } /* end if */
-
- /* Check if word was actually unique */
- if (tmp_word != NULL)
- uniq_words[w++] = tmp_word;
- } /* end for */
-
- /* Create randomized set of unique words */
- for (u = 0; u < num_uniq_words; u++)
- rand_uniq_words[u] = uniq_words[u];
- curr_time = HDtime(NULL);
- HDsrandom((unsigned)curr_time);
- for (u = 0; u < num_uniq_words; u++) {
- v = u + ((size_t)HDrandom() % (num_uniq_words - u));
- if (u != v) {
- tmp_word = rand_uniq_words[u];
- rand_uniq_words[u] = rand_uniq_words[v];
- rand_uniq_words[v] = tmp_word;
- } /* end if */
- } /* end for */
-
- /* Create sorted set of unique words */
- for (u = 0; u < num_uniq_words; u++)
- sort_uniq_words[u] = uniq_words[u];
- HDqsort(sort_uniq_words, num_uniq_words, sizeof(char *), tst_strcmp);
-} /* end test_tst_init() */
-
-/****************************************************************
-**
-** test_tst_create(): Test basic H5ST (ternary search tree) selection code.
-** Tests creating and closing TSTs.
-**
-****************************************************************/
-static void
-test_tst_create(void)
-{
- H5ST_tree_t *tree; /* TST created */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Creating & Closing TSTs\n"));
-
- /* Try closing a NULL tree */
- tree = NULL;
- ret = H5ST_close(tree);
- VERIFY(ret, FAIL, "H5ST_close");
-
- /* Try creating a TST */
- tree = H5ST_create();
- CHECK_PTR(tree, "H5ST_create");
-
- /* Try closing a real tree */
- ret = H5ST_close(tree);
- CHECK(ret, FAIL, "H5ST_close");
-
-} /* end test_tst_create() */
-
-/****************************************************************
-**
-** test_tst_insert(): Test basic H5ST (ternary search tree) selection code.
-** Tests inserting key/value pairs into TST
-**
-****************************************************************/
-static void
-test_tst_insert(void)
-{
- H5ST_tree_t *tree; /* TST created */
- H5ST_ptr_t found; /* Pointer to TST node found */
- void * obj; /* Pointer to object located in TST */
- size_t u; /* Local index counter */
- htri_t check; /* Is string in TST? */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Inserting Values into TSTs\n"));
-
- /* Create the TST */
- tree = H5ST_create();
- CHECK_PTR(tree, "H5ST_create");
-
- /* Insert unique words into TST, in random order */
- for (u = 0; u < num_uniq_words; u++) {
- ret = H5ST_insert(tree, rand_uniq_words[u], rand_uniq_words[u]);
- CHECK(ret, FAIL, "H5ST_insert");
- } /* end for */
-
- /* Verify that all words were inserted into TST properly */
- for (u = 0; u < num_uniq_words; u++) {
- /* Check that the word is present */
- check = H5ST_search(tree, uniq_words[u]);
- VERIFY(check, TRUE, "H5ST_search");
-
- /* Check that the value "payloads" are correct */
- found = H5ST_find(tree, uniq_words[u]);
- CHECK_PTR(found, "H5ST_find");
-
- if (HDstrcmp((const char *)found->eqkid, uniq_words[u]))
- TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, uniq_words[%u]=%s\n", __LINE__,
- (char *)found->eqkid, (unsigned)u, uniq_words[u]);
-
- obj = H5ST_locate(tree, uniq_words[u]);
- CHECK_PTR(obj, "H5ST_locate");
-
- if (HDstrcmp((const char *)obj, uniq_words[u]))
- TestErrPrintf("%d: TST objects don't match!, obj=%s, uniq_words[%u]=%s\n", __LINE__, (char *)obj,
- (unsigned)u, uniq_words[u]);
- } /* end for */
-
- /* Verify that words not in the TST aren't found */
- check = H5ST_search(tree, "foo");
- VERIFY(check, FALSE, "H5ST_search");
- check = H5ST_search(tree, "bar");
- VERIFY(check, FALSE, "H5ST_search");
- check = H5ST_search(tree, "baz");
- VERIFY(check, FALSE, "H5ST_search");
-
- /* Close the TST */
- ret = H5ST_close(tree);
- CHECK(ret, FAIL, "H5ST_close");
-} /* end test_tst_insert() */
-
-/****************************************************************
-**
-** test_tst_iterate(): Test basic H5ST (ternary search tree) code.
-** Tests iterating through key/value pairs in TST
-**
-****************************************************************/
-static void
-test_tst_iterate(void)
-{
- H5ST_tree_t *tree; /* TST created */
- H5ST_ptr_t found; /* Pointer to TST node found */
- size_t u; /* Local index counter */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Iterating Over TSTs\n"));
-
- /* Create the TST */
- tree = H5ST_create();
- CHECK_PTR(tree, "H5ST_create");
-
- /* Insert unique words into TST, in random order */
- for (u = 0; u < num_uniq_words; u++) {
- ret = H5ST_insert(tree, rand_uniq_words[u], rand_uniq_words[u]);
- CHECK(ret, FAIL, "H5ST_insert");
- } /* end for */
-
- /* Use findfirst/findnext calls to iterate through TST */
- found = H5ST_findfirst(tree);
- CHECK_PTR(found, "H5ST_findfirst");
- u = 0;
- do {
- /* Check that the strings in the TST are in the correct order */
- if (HDstrcmp((const char *)found->eqkid, sort_uniq_words[u]))
- TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, sort_uniq_words[%u]=%s\n",
- __LINE__, (char *)found->eqkid, (unsigned)u, sort_uniq_words[u]);
-
- /* Advance to next string in TST */
- found = H5ST_findnext(found);
- u++;
- } while (found != NULL);
-
- /* Close the TST */
- ret = H5ST_close(tree);
- CHECK(ret, FAIL, "H5ST_close");
-} /* end test_tst_iterate() */
-
-/****************************************************************
-**
-** test_tst_remove(): Test basic H5ST (ternary search tree) code.
-** Tests removing key/value pairs by string value in TST
-**
-****************************************************************/
-static void
-test_tst_remove(void)
-{
- H5ST_tree_t *tree; /* TST created */
- H5ST_ptr_t found; /* Pointer to TST node found */
- void * obj; /* Pointer to object removed from TST */
- htri_t check; /* Is string in TST? */
- size_t u; /* Local index counter */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Removing String Values from TSTs\n"));
-
- /* Create the TST */
- tree = H5ST_create();
- CHECK_PTR(tree, "H5ST_create");
-
- /* Insert unique words into TST, in random order */
- for (u = 0; u < num_uniq_words; u++) {
- ret = H5ST_insert(tree, rand_uniq_words[u], rand_uniq_words[u]);
- CHECK(ret, FAIL, "H5ST_insert");
- } /* end for */
-
- /* Remove strings from TST in random order */
- for (u = 0; u < num_uniq_words; u++) {
- obj = H5ST_remove(tree, rand_uniq_words[u]);
- CHECK_PTR(obj, "H5ST_remove");
-
- /* Check that the correct string was removed from TST */
- if (HDstrcmp((const char *)obj, rand_uniq_words[u]))
- TestErrPrintf("%d: TST node values don't match!, obj=%s, rand_uniq_words[%u]=%s\n", __LINE__,
- (char *)obj, (unsigned)u, rand_uniq_words[u]);
-
- /* Check that the string can't be found in the TST any longer */
- check = H5ST_search(tree, rand_uniq_words[u]);
- VERIFY(check, FALSE, "H5ST_search");
- } /* end for */
-
- /* Re-insert unique words into TST, in random order */
- for (u = 0; u < num_uniq_words; u++) {
- ret = H5ST_insert(tree, rand_uniq_words[u], rand_uniq_words[u]);
- CHECK(ret, FAIL, "H5ST_insert");
- } /* end for */
-
- /* Remove TST nodes from TST in random order */
- for (u = 0; u < num_uniq_words; u++) {
- /* Get the pointer to the node to delete */
- found = H5ST_find(tree, rand_uniq_words[u]);
- CHECK_PTR(found, "H5ST_find");
-
- /* Check that the correct object will be removed from TST */
- if (HDstrcmp((const char *)found->eqkid, rand_uniq_words[u]))
- TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, rand_uniq_words[%u]=%s\n",
- __LINE__, (char *)found->eqkid, (unsigned)u, rand_uniq_words[u]);
-
- /* Remove the node */
- ret = H5ST_delete(tree, found);
- CHECK(ret, FAIL, "H5ST_delete");
-
- /* Check that the string can't be found in the TST any longer */
- check = H5ST_search(tree, rand_uniq_words[u]);
- VERIFY(check, FALSE, "H5ST_search");
- } /* end for */
-
- /* Close the TST */
- ret = H5ST_close(tree);
- CHECK(ret, FAIL, "H5ST_close");
-} /* end test_tst_remove() */
-
-/****************************************************************
-**
-** test_tst_finalize(): Test basic H5ST (ternary search tree) selection code.
-** Wrap up data for TST testing
-**
-****************************************************************/
-static void
-test_tst_finalize(void)
-{
- /* Release memory for unordered, randomized and sorted order unique words */
- HDfree(uniq_words);
- HDfree(rand_uniq_words);
- HDfree(sort_uniq_words);
-} /* end test_tst_finalize() */
-
-/****************************************************************
-**
-** test_tst(): Main H5ST selection testing routine.
-**
-****************************************************************/
-void
-test_tst(void)
-{
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Ternary Search Trees\n"));
-
- /* Initialize TST testing data */
- test_tst_init();
-
- /* Actual TST tests */
- test_tst_create(); /* Test TST creation */
- test_tst_insert(); /* Test TST insertion */
- test_tst_iterate(); /* Test TST iteration */
- test_tst_remove(); /* Test TST deletion */
-
- /* Finalize TST testing data */
- test_tst_finalize();
-} /* end test_tst() */
diff --git a/test/tunicode.c b/test/tunicode.c
index 28f819b..52341bb 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -532,7 +532,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -541,7 +541,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -682,7 +682,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = strcmp(readbuf, string);
+ ret = HDstrcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -709,7 +709,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 0b448ad..7e47c7b 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -110,14 +110,13 @@ test_vlstr_free_custom(void *_mem, void *info)
static void
test_vlstrings_basic(void)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1] = {
"Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
- "testing whether that nation or any nation so conceived and so dedicated can long endure."}; /* Information
- to
- write
- */
+ "testing whether that nation or any nation so conceived and so dedicated can long endure."};
+
char * rdata[SPACE1_DIM1]; /* Information read in */
char * wdata2;
hid_t dataspace, dataset2;
@@ -204,7 +203,7 @@ test_vlstrings_basic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -308,7 +307,7 @@ test_vlstrings_special(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
@@ -537,7 +536,7 @@ test_compact_vlstring(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -660,8 +659,6 @@ test_write_vl_string_attribute(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
}
/****************************************************************
@@ -740,8 +737,6 @@ test_read_vl_string_attribute(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
}
/* Helper routine for test_vl_rewrite() */
@@ -778,7 +773,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read))
+ if (HDstrcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -865,8 +860,6 @@ test_vl_rewrite(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
} /* end test_vl_rewrite() */
/****************************************************************
diff --git a/test/tvltypes.c b/test/tvltypes.c
index cd8e3cb..50b2d7a 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1385,7 +1385,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string)) {
+ if (HDstrcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1446,7 +1446,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string)) {
+ if (HDstrcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2487,17 +2487,17 @@ test_vltypes_fill_value(void)
typedef struct dtype1_struct {
unsigned int gui;
unsigned int pgui;
- char * str_id;
- char * str_name;
- char * str_desc;
- char * str_orig;
- char * str_stat;
+ const char * str_id;
+ const char * str_name;
+ const char * str_desc;
+ const char * str_orig;
+ const char * str_stat;
unsigned int ver;
double val;
double ma;
double mi;
- char * str_form;
- char * str_unit;
+ const char * str_form;
+ const char * str_unit;
} dtype1_struct;
herr_t ret;
@@ -2508,8 +2508,8 @@ test_vltypes_fill_value(void)
hid_t large_dspace_id; /* Dataspace ID for large datasets */
hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
- hid_t dset_dspace_id; /* Dataspace ID for a particular dataset */
- hid_t dset_select_dspace_id; /* Dataspace ID for selection in a particular dataset */
+ hid_t dset_dspace_id = -1; /* Dataspace ID for a particular dataset */
+ hid_t dset_select_dspace_id = -1; /* Dataspace ID for selection in a particular dataset */
hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
hid_t single_dspace_id; /* Dataspace ID for single element selection */
hsize_t single_offset[] = {2}; /* Offset of single element selection */
@@ -2525,8 +2525,8 @@ test_vltypes_fill_value(void)
hid_t dset_id;
hsize_t small_dims[] = {SPACE4_DIM_SMALL};
hsize_t large_dims[] = {SPACE4_DIM_LARGE};
- size_t dset_elmts; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
+ size_t dset_elmts = 0; /* Number of elements in a particular dataset */
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
3, 4.0F, 100.0F, 1.0F, "liquid", "meter"};
const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0F, 200.0F, 2.0F, "solid", "yard"};
dtype1_struct * rbuf = NULL; /* Buffer for reading data */
@@ -2691,13 +2691,13 @@ test_vltypes_fill_value(void)
} break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2799,13 +2799,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2819,10 +2819,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2842,10 +2842,11 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2876,10 +2877,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2899,10 +2900,11 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2984,13 +2986,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -3017,21 +3019,22 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3052,22 +3055,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3103,21 +3107,22 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3138,22 +3143,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3256,5 +3262,5 @@ test_vltypes(void)
void
cleanup_vltypes(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/twriteorder.c b/test/twriteorder.c
index 83a615c..e792487 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -61,11 +61,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#define DATAFILE "twriteorder.dat"
/* #define READERS_MAX 10 */ /* max number of readers */
@@ -141,21 +139,21 @@ parse_option(int argc, char *const argv[])
HDexit(EXIT_SUCCESS);
break;
case 'b': /* number of planes to write/read */
- if ((blocksize_g = atoi(optarg)) <= 0) {
+ if ((blocksize_g = HDatoi(optarg)) <= 0) {
HDfprintf(stderr, "bad blocksize %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'n': /* number of planes to write/read */
- if ((nlinkedblock_g = atoi(optarg)) < 2) {
+ if ((nlinkedblock_g = HDatoi(optarg)) < 2) {
HDfprintf(stderr, "bad number of linked blocks %s, must be greater than 1.\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'p': /* number of planes to write/read */
- if ((part_size_g = atoi(optarg)) <= 0) {
+ if ((part_size_g = HDatoi(optarg)) <= 0) {
HDfprintf(stderr, "bad partition size %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
@@ -404,7 +402,7 @@ main(int argc, char *argv[])
Hgoto_error(1);
};
};
- mypid = getpid();
+ mypid = HDgetpid();
/* ============= */
/* launch reader */
@@ -440,7 +438,7 @@ main(int argc, char *argv[])
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (launch_g == UC_READWRITE) {
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
HDperror("waitpid");
Hgoto_error(1);
}
@@ -468,7 +466,7 @@ done:
return ret_value;
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -477,4 +475,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/unlink.c b/test/unlink.c
index ce45bc9..94bd035 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, September 25, 1998
*
* Purpose: Test unlinking operations.
@@ -516,7 +516,7 @@ check_new_move(hid_t fapl)
/* Check soft links */
if (H5Lget_val(file, "group2/soft", linkval, sizeof(linkval), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/group1/group_move"))
+ if (HDstrcmp(linkval, "/group1/group_move") != 0)
FAIL_PUTS_ERROR(" Soft link test failed. Wrong link value")
/* Cleanup */
@@ -581,7 +581,7 @@ test_filespace(hid_t fapl)
size_t rdcc_nbytes;
double rdcc_w0;
- puts("Testing file space gets reused:");
+ HDputs("Testing file space gets reused:");
/* Open file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
diff --git a/test/unregister.c b/test/unregister.c
index 4b88093..c6da4df 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -90,11 +90,20 @@ test_unregister_filters(hid_t fapl_id)
char filename[FILENAME_BUF_SIZE];
const hsize_t chunk_dims[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
hsize_t dims[2];
- int data[DSET_DIM1][DSET_DIM2];
+ int ** buf = NULL;
+ int * buf_data = NULL;
herr_t ret;
TESTING("Unregistering filter");
+ /* Set up data array */
+ if (NULL == (buf_data = (int *)HDcalloc(DSET_DIM1 * DSET_DIM2, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf = (int **)HDcalloc(DSET_DIM1, sizeof(buf_data))))
+ TEST_ERROR;
+ for (i = 0; i < DSET_DIM1; i++)
+ buf[i] = buf_data + (i * DSET_DIM2);
+
/* Create first file */
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
if ((fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
@@ -173,7 +182,7 @@ test_unregister_filters(hid_t fapl_id)
/* Initialize the data for writing */
for (i = n = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++)
- data[i][j] = n++;
+ buf[i][j] = n++;
/* Create the dataspace */
dims[0] = DSET_DIM1;
@@ -186,7 +195,7 @@ test_unregister_filters(hid_t fapl_id)
goto error;
/* Write the data to the dataset */
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0)
goto error;
/* Unregister the filter before closing the dataset. It should fail */
@@ -210,7 +219,7 @@ test_unregister_filters(hid_t fapl_id)
goto error;
/* Write the data to the dataset */
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0)
goto error;
/* Close the dataset in the second file */
@@ -231,6 +240,9 @@ test_unregister_filters(hid_t fapl_id)
if (H5Fclose(fid2) < 0)
goto error;
+ HDfree(buf);
+ HDfree(buf_data);
+
PASSED();
return SUCCEED;
@@ -248,6 +260,9 @@ error:
}
H5E_END_TRY;
+ HDfree(buf);
+ HDfree(buf_data);
+
return FAIL;
}
diff --git a/test/use.h b/test/use.h
index 382e835..0ad3ef0 100644
--- a/test/use.h
+++ b/test/use.h
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -43,27 +43,25 @@ typedef enum part_t {
} part_t;
typedef struct options_t {
- hsize_t chunksize; /* chunks are chunksize^2 planes */
- hsize_t chunkplanes; /* number of planes per chunk, default 1 */
- hsize_t chunkdims[UC_RANK]; /* chunk dims is (chunkplan, chunksize, chunksize) */
- hsize_t dims[UC_RANK]; /* dataset initial dims */
- hsize_t max_dims[UC_RANK]; /* dataset max dims */
- hsize_t nplanes; /* number of planes to write, default proportional to chunksize */
- char * filename; /* use case data filename */
- part_t launch; /* launch writer, reader or both */
- hbool_t use_swmr; /* use swmr open (1) or not */
- int iterations; /* iterations, default 1 */
+ hsize_t chunksize; /* chunks are chunksize^2 planes */
+ hsize_t chunkplanes; /* number of planes per chunk, default 1 */
+ hsize_t chunkdims[UC_RANK]; /* chunk dims is (chunkplan, chunksize, chunksize) */
+ hsize_t dims[UC_RANK]; /* dataset initial dims */
+ hsize_t max_dims[UC_RANK]; /* dataset max dims */
+ hsize_t nplanes; /* number of planes to write, default proportional to chunksize */
+ char * filename; /* use case data filename */
+ part_t launch; /* launch writer, reader or both */
+ hbool_t use_swmr; /* use swmr open (1) or not */
+ int iterations; /* iterations, default 1 */
+ hid_t fapl_id; /* instance-specific FAPL ID */
+ const char *progname; /* Program name (used in usage and dset name) */
} options_t;
-/* global variables declarations */
-extern options_t UC_opts; /* Use Case Options */
-extern const char *progname_g; /* Program name */
-
/* prototype declarations */
-int parse_option(int argc, char *const argv[]);
-int setup_parameters(int argc, char *const argv[]);
-void show_parameters(void);
+int parse_option(int argc, char *const argv[], options_t *opts);
+int setup_parameters(int argc, char *const argv[], options_t *opts);
+void show_parameters(options_t *opts);
void usage(const char *prog);
-int create_uc_file(void);
-int write_uc_file(hbool_t tosend, hid_t fid);
-int read_uc_file(hbool_t towait);
+int create_uc_file(options_t *opts);
+int write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts);
+int read_uc_file(hbool_t towait, options_t *opts);
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 812dc52..107615a 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -5,13 +5,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Use Case 1.7 Appending a single chunk
+ * Use Case 1.7 Appending a single chunk
* Description:
* Appending a single chunk of raw data to a dataset along an unlimited
* dimension within a pre-created file and reading the new data back.
@@ -24,35 +24,36 @@
* Level:
* User Level
* Guarantees:
- * o Readers will see the modified dimension sizes after the Writer
- * finishes HDF5 metadata updates and issues H5Fflush or H5Oflush calls.
- * o Readers will see newly appended data after the Writer finishes
- * the flush operation.
+ * o Readers will see the modified dimension sizes after the Writer
+ * finishes HDF5 metadata updates and issues H5Fflush or H5Oflush calls.
+ * o Readers will see newly appended data after the Writer finishes
+ * the flush operation.
*
* Preconditions:
- * o Readers are not allowed to modify the file. o All datasets
- * that are modified by the Writer exist when the Writer opens the file.
- * o All datasets that are modified by the Writer exist when a Reader
- * opens the file. o Data is written by a hyperslab contained in
- * one chunk.
+ * o Readers are not allowed to modify the file.
+ * o All datasets that are modified by the Writer exist when the Writer
+ * opens the file.
+ * o All datasets that are modified by the Writer exist when a Reader
+ * opens the file.
+ * o Data is written by a hyperslab contained in one chunk.
*
* Main Success Scenario:
- * 1. An application creates a file with required objects (groups,
- * datasets, and attributes).
- * 2. The Writer application opens the file and datasets in the file
- * and starts adding data along the unlimited dimension using a hyperslab
- * selection that corresponds to an HDF5 chunk.
- * 3. A Reader opens the file and a dataset in a file, and queries
- * the sizes of the dataset; if the extent of the dataset has changed,
- * reads the appended data back.
+ * 1. An application creates a file with required objects (groups,
+ * datasets, and attributes).
+ * 2. The Writer application opens the file and datasets in the file
+ * and starts adding data along the unlimited dimension using a hyperslab
+ * selection that corresponds to an HDF5 chunk.
+ * 3. A Reader opens the file and a dataset in a file, and queries
+ * the sizes of the dataset; if the extent of the dataset has changed,
+ * reads the appended data back.
*
* Discussion points:
- * 1. Since the new data is written to the file, and metadata update
- * operation of adding pointer to the newly written chunk is atomic and
- * happens after the chunk is on the disk, only two things may happen
- * to the Reader:
- * o The Reader will not see new data.
- * o The Reader will see all new data written by Writer.
+ * 1. Since the new data is written to the file, and metadata update
+ * operation of adding pointer to the newly written chunk is atomic and
+ * happens after the chunk is on the disk, only two things may happen
+ * to the Reader:
+ * o The Reader will not see new data.
+ * o The Reader will see all new data written by Writer.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Created: Albert Cheng, 2013/5/28 */
@@ -60,52 +61,46 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
-/* Global Variable definitions */
-options_t UC_opts; /* Use Case Options */
-const char *progname_g = "use_append_chunk"; /* program name */
+#define USE_APPEND_CHUNK_PROGNAME "use_append_chunk"
+
+static options_t UC_opts; /* Use Case Options */
/* Setup parameters for the use case.
* Return: 0 succeed; -1 fail.
*/
int
-setup_parameters(int argc, char *const argv[])
+setup_parameters(int argc, char *const argv[], options_t *opts)
{
/* use case defaults */
- HDmemset(&UC_opts, 0, sizeof(options_t));
- UC_opts.chunksize = Chunksize_DFT;
- UC_opts.use_swmr = TRUE; /* use swmr open */
- UC_opts.iterations = 1;
- UC_opts.chunkplanes = 1;
-
- /* parse options */
- if (parse_option(argc, argv) < 0)
+ HDmemset(opts, 0, sizeof(options_t));
+ opts->chunksize = Chunksize_DFT;
+ opts->use_swmr = TRUE; /* use swmr open */
+ opts->iterations = 1;
+ opts->chunkplanes = 1;
+ opts->progname = USE_APPEND_CHUNK_PROGNAME;
+
+ if (parse_option(argc, argv, opts) < 0)
return (-1);
- /* set chunk dims */
- UC_opts.chunkdims[0] = UC_opts.chunkplanes;
- UC_opts.chunkdims[1] = UC_opts.chunkdims[2] = UC_opts.chunksize;
+ opts->chunkdims[0] = opts->chunkplanes;
+ opts->chunkdims[1] = opts->chunkdims[2] = opts->chunksize;
- /* set dataset initial and max dims */
- UC_opts.dims[0] = 0;
- UC_opts.max_dims[0] = H5S_UNLIMITED;
- UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1] = UC_opts.max_dims[2] = UC_opts.chunksize;
+ opts->dims[0] = 0;
+ opts->max_dims[0] = H5S_UNLIMITED;
+ opts->dims[1] = opts->dims[2] = opts->max_dims[1] = opts->max_dims[2] = opts->chunksize;
- /* set nplanes */
- if (UC_opts.nplanes == 0)
- UC_opts.nplanes = (hsize_t)UC_opts.chunksize;
+ if (opts->nplanes == 0)
+ opts->nplanes = (hsize_t)opts->chunksize;
- /* show parameters and return */
- show_parameters();
+ show_parameters(opts);
return (0);
-}
+} /* setup_parameters() */
/* Overall Algorithm:
* Parse options from user;
@@ -126,10 +121,8 @@ main(int argc, char *argv[])
hbool_t send_wait = FALSE;
hid_t fapl = -1; /* File access property list */
hid_t fid = -1; /* File ID */
- char * name; /* Test file name */
- /* initialization */
- if (setup_parameters(argc, argv) < 0) {
+ if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
}
@@ -144,26 +137,43 @@ main(int argc, char *argv[])
/* UC_WRITER: create datafile, skip reader, launch writer. */
/* UC_READER: skip create, launch reader, exit. */
/* ==============================================================*/
- /* ============*/
+ /* =========== */
/* Create file */
- /* ============*/
+ /* =========== */
if (UC_opts.launch != UC_READER) {
HDprintf("Creating skeleton data file for test...\n");
- if (create_uc_file() < 0) {
+ if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't create creation FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ Hgoto_error(1);
+ }
+ if (create_uc_file(&UC_opts) < 0) {
HDfprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
- else
+ else {
HDprintf("File created.\n");
+ }
+ /* Close FAPL to prevent issues with forking later */
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close creation FAPL\n");
+ Hgoto_error(1);
+ }
+ UC_opts.fapl_id = H5I_INVALID_HID;
}
+ /* ============ */
+ /* Fork process */
+ /* ============ */
if (UC_opts.launch == UC_READWRITE) {
- /* fork process */
if ((childpid = HDfork()) < 0) {
HDperror("fork");
Hgoto_error(1);
- };
- };
+ }
+ }
mypid = HDgetpid();
/* ============= */
@@ -173,10 +183,18 @@ main(int argc, char *argv[])
/* child process launch the reader */
if (0 == childpid) {
HDprintf("%d: launch reader process\n", mypid);
- if (read_uc_file(send_wait) < 0) {
+ if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't create read FAPL\n");
+ HDexit(EXIT_FAILURE);
+ }
+ if (read_uc_file(send_wait, &UC_opts) < 0) {
HDfprintf(stderr, "read_uc_file encountered error\n");
HDexit(EXIT_FAILURE);
}
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close read FAPL\n");
+ HDexit(EXIT_FAILURE);
+ }
HDexit(EXIT_SUCCESS);
}
}
@@ -187,27 +205,39 @@ main(int argc, char *argv[])
/* this process continues to launch the writer */
HDprintf("%d: continue as the writer process\n", mypid);
- name = UC_opts.filename;
-
- /* Set file access proeprty list */
- if ((fapl = h5_fileaccess()) < 0)
+ if ((fapl = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't create write FAPL\n");
Hgoto_error(1);
+ }
- if (UC_opts.use_swmr)
- if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ if (UC_opts.use_swmr) {
+ if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set write FAPL libver bounds\n");
Hgoto_error(1);
+ }
+ }
- /* Open the file */
- if ((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) {
+ if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) <
+ 0) {
HDfprintf(stderr, "H5Fopen failed\n");
Hgoto_error(1);
}
- if (write_uc_file(send_wait, fid) < 0) {
+ if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
HDfprintf(stderr, "write_uc_file encountered error\n");
Hgoto_error(1);
}
+ if (H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "Failed to close write\n");
+ Hgoto_error(1);
+ }
+
+ if (H5Pclose(fapl) < 0) {
+ HDfprintf(stderr, "can't close write FAPL\n");
+ Hgoto_error(1);
+ }
+
/* ================================================ */
/* If readwrite, collect exit code of child process */
/* ================================================ */
@@ -217,18 +247,6 @@ main(int argc, char *argv[])
Hgoto_error(1);
}
- /* Close the file */
- if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close file id\n");
- Hgoto_error(1);
- }
-
- /* Close the property list */
- if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "Failed to close the property list\n");
- Hgoto_error(1);
- }
-
if (WIFEXITED(child_status)) {
if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
@@ -242,7 +260,6 @@ main(int argc, char *argv[])
}
done:
- /* Print result and exit */
if (ret_value != 0) {
HDprintf("Error(s) encountered\n");
}
@@ -253,7 +270,7 @@ done:
return (ret_value);
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -262,4 +279,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
new file mode 100644
index 0000000..b19c510
--- /dev/null
+++ b/test/use_append_chunk_mirror.c
@@ -0,0 +1,401 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* HACKED VERSION
+ * Demonstrate SWMR with a mirrored file.
+ *
+ * Must be built with SERVER_IP as the IP address of the target system
+ * with a running mirror server, and SERVER_PORT as the primary server port.
+ *
+ * In addition to the local file, 'shinano.h5' will be created on the remote
+ * system, mirroring the local file. The file location will be local to
+ * Server's/Writer's invocation directory.
+ *
+ * Template for demonstration purposes:
+ *
+ * # Launch mirror server on remote machine (in foreground to easily stop)
+ * REMOTE(1)$ ./mirror_server /path/to/mirror_worker
+ *
+ * # Launch chunk writer with plenty of chunks.
+ * LOCAL(1)$ ./use_append_chunk_mirror -l w -n 10000
+ *
+ * # Wait one second for files to be created.
+ *
+ * # Launch chunk readers on both files.
+ * LOCAL(2)$ ./use_append_chunk_mirror -l r -n 10000
+ * REMOTE(2)$ ./use_append_chunk_mirror -l r -n 10000 -f shinano.h5
+ *
+ * # Hard-stop the server.
+ * REMOTE(1)$ ^C
+ * # alt, softer shutdown using echo and nc
+ * echo "SHUTDOWN" | nc localhost 3000
+ */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Use Case 1.7 Appending a single chunk
+ * Description:
+ * Appending a single chunk of raw data to a dataset along an unlimited
+ * dimension within a pre-created file and reading the new data back.
+ * Goal:
+ * Read data appended by the Writer to a pre-existing dataset in a
+ * file. The dataset has one or more unlimited dimensions. The data is
+ * appended by a hyperslab that is contained in one chunk (for example,
+ * appending 2-dim planes along the slowest changing dimension in the
+ * 3-dim dataset).
+ * Level:
+ * User Level
+ * Guarantees:
+ * o Readers will see the modified dimension sizes after the Writer
+ * finishes HDF5 metadata updates and issues H5Fflush or H5Oflush calls.
+ * o Readers will see newly appended data after the Writer finishes
+ * the flush operation.
+ *
+ * Preconditions:
+ * o Readers are not allowed to modify the file.
+ * o All datasets that are modified by the Writer exist when the Writer
+ * opens the file.
+ * o All datasets that are modified by the Writer exist when a Reader
+ * opens the file.
+ * o Data is written by a hyperslab contained in one chunk.
+ *
+ * Main Success Scenario:
+ * 1. An application creates a file with required objects (groups,
+ * datasets, and attributes).
+ * 2. The Writer application opens the file and datasets in the file
+ * and starts adding data along the unlimited dimension using a hyperslab
+ * selection that corresponds to an HDF5 chunk.
+ * 3. A Reader opens the file and a dataset in a file, and queries
+ * the sizes of the dataset; if the extent of the dataset has changed,
+ * reads the appended data back.
+ *
+ * Discussion points:
+ * 1. Since the new data is written to the file, and metadata update
+ * operation of adding pointer to the newly written chunk is atomic and
+ * happens after the chunk is on the disk, only two things may happen
+ * to the Reader:
+ * o The Reader will not see new data.
+ * o The Reader will see all new data written by Writer.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Created: Jacob Smith, 2019 */
+
+#include "use.h"
+
+/* This test uses many POSIX things that are not available on
+ * Windows.
+ */
+#ifdef H5_HAVE_UNISTD_H
+
+#ifdef H5_HAVE_MIRROR_VFD
+
+#define THIS_PROGNAME "use_append_chunk_mirror"
+
+#define CONNECT_WITH_JELLY 0
+
+#if CONNECT_WITH_JELLY
+#define SERVER_IP "10.10.10.248" /* hard-coded IP address */
+#else
+#define SERVER_IP "127.0.0.1" /* localhost */
+#endif /* CONNECT_WITH_JELLY */
+#define SERVER_PORT 3000 /* hard-coded port number */
+#define MIRROR_FILE_NAME "shinano.h5" /* hard-coded duplicate/mirror filename */
+
+static options_t UC_opts; /* Use Case Options */
+
+/* Setup parameters for the use case.
+ * Return: 0 succeed; -1 fail.
+ */
+int
+setup_parameters(int argc, char *const argv[], options_t *opts)
+{
+ /* use case defaults */
+ HDmemset(opts, 0, sizeof(options_t));
+ opts->chunksize = Chunksize_DFT;
+ opts->use_swmr = TRUE;
+ opts->iterations = 1;
+ opts->chunkplanes = 1;
+ opts->progname = THIS_PROGNAME;
+
+ if (parse_option(argc, argv, opts) < 0)
+ return (-1);
+
+ opts->chunkdims[0] = opts->chunkplanes;
+ opts->chunkdims[1] = opts->chunkdims[2] = opts->chunksize;
+
+ opts->dims[0] = 0;
+ opts->max_dims[0] = H5S_UNLIMITED;
+ opts->dims[1] = opts->dims[2] = opts->max_dims[1] = opts->max_dims[2] = opts->chunksize;
+
+ if (opts->nplanes == 0)
+ opts->nplanes = (hsize_t)opts->chunksize;
+
+ show_parameters(opts);
+ return (0);
+} /* setup_parameters() */
+
+/* Overall Algorithm:
+ * Parse options from user;
+ * Generate/pre-created test files needed and close it;
+ * fork: child process becomes the reader process;
+ * while parent process continues as the writer process;
+ * both run till ending conditions are met.
+ */
+int
+main(int argc, char *argv[])
+{
+ pid_t childpid = 0;
+ pid_t mypid, tmppid;
+ int child_status;
+ int child_wait_option = 0;
+ int ret_value = 0;
+ int child_ret_value;
+ hbool_t send_wait = FALSE;
+ hid_t fid = -1; /* File ID */
+ H5FD_mirror_fapl_t mirr_fa;
+ H5FD_splitter_vfd_config_t split_fa;
+ hid_t mirr_fapl_id = H5I_INVALID_HID;
+
+ if (setup_parameters(argc, argv, &UC_opts) < 0) {
+ Hgoto_error(1);
+ }
+
+ mirr_fa.magic = H5FD_MIRROR_FAPL_MAGIC;
+ mirr_fa.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
+ mirr_fa.handshake_port = SERVER_PORT;
+ HDstrncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
+
+ split_fa.wo_fapl_id = H5I_INVALID_HID;
+ split_fa.rw_fapl_id = H5I_INVALID_HID;
+ split_fa.magic = H5FD_SPLITTER_MAGIC;
+ split_fa.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ split_fa.log_file_path[0] = '\0'; /* none */
+ split_fa.ignore_wo_errs = FALSE;
+ HDstrncpy(split_fa.wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
+
+ /* Determine the need to send/wait message file*/
+ if (UC_opts.launch == UC_READWRITE) {
+ HDunlink(WRITER_MESSAGE);
+ send_wait = TRUE;
+ }
+
+ /* ==============================================================*/
+ /* UC_READWRITE: create datafile, launch both reader and writer. */
+ /* UC_WRITER: create datafile, skip reader, launch writer. */
+ /* UC_READER: skip create, launch reader, exit. */
+ /* ==============================================================*/
+ /* =========== */
+ /* Create file */
+ /* =========== */
+ if (UC_opts.launch != UC_READER) {
+ HDprintf("Creating skeleton data file for test...\n");
+
+ /* Prepare mirror child driver */
+ mirr_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (mirr_fapl_id == H5I_INVALID_HID) {
+ HDfprintf(stderr, "can't create creation mirror FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_fapl_mirror(mirr_fapl_id, &mirr_fa) < 0) {
+ HDfprintf(stderr, "can't set creation mirror FAPL\n");
+ H5Eprint2(H5E_DEFAULT, stdout);
+ Hgoto_error(1);
+ }
+
+ /* Prepare parent "splitter" driver in UC_opts */
+ split_fa.wo_fapl_id = mirr_fapl_id;
+ split_fa.rw_fapl_id = H5P_DEFAULT;
+ UC_opts.fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (UC_opts.fapl_id == H5I_INVALID_HID) {
+ HDfprintf(stderr, "can't create creation FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_fapl_splitter(UC_opts.fapl_id, &split_fa) < 0) {
+ HDfprintf(stderr, "can't set creation FAPL\n");
+ H5Eprint2(H5E_DEFAULT, stdout);
+ Hgoto_error(1);
+ }
+
+ if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ Hgoto_error(1);
+ }
+
+ /* Create file */
+ if (create_uc_file(&UC_opts) < 0) {
+ HDfprintf(stderr, "***encounter error\n");
+ Hgoto_error(1);
+ }
+ else {
+ HDprintf("File created.\n");
+ }
+
+ /* Close FAPLs to prevent issues with forking later */
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close creation FAPL\n");
+ Hgoto_error(1);
+ }
+ UC_opts.fapl_id = H5I_INVALID_HID;
+ if (H5Pclose(mirr_fapl_id) < 0) {
+ HDfprintf(stderr, "can't close creation mirror FAPL\n");
+ Hgoto_error(1);
+ }
+ mirr_fapl_id = H5I_INVALID_HID;
+ }
+
+ /* ============ */
+ /* Fork process */
+ /* ============ */
+ if (UC_opts.launch == UC_READWRITE) {
+ if ((childpid = HDfork()) < 0) {
+ HDperror("fork");
+ Hgoto_error(1);
+ }
+ }
+ mypid = HDgetpid();
+
+ /* ============= */
+ /* launch reader */
+ /* ============= */
+ if (UC_opts.launch != UC_WRITER) {
+ /* child process -- launch the reader */
+ /* reader only opens the one file -- separate reader needed for mirrored file 'shinano.h5' */
+ if (0 == childpid) {
+ HDprintf("%d: launch reader process\n", mypid);
+
+ UC_opts.fapl_id = H5P_DEFAULT;
+ if (read_uc_file(send_wait, &UC_opts) < 0) {
+ HDfprintf(stderr, "read_uc_file encountered error (%d)\n", mypid);
+ HDexit(1);
+ }
+
+ HDexit(0);
+ }
+ }
+
+ /* ============= */
+ /* launch writer */
+ /* ============= */
+ /* this process continues to launch the writer */
+ HDprintf("%d: continue as the writer process\n", mypid);
+
+ /* Prepare mirror child driver */
+ mirr_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (mirr_fapl_id == H5I_INVALID_HID) {
+ HDfprintf(stderr, "can't create creation mirror FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_fapl_mirror(mirr_fapl_id, &mirr_fa) < 0) {
+ HDfprintf(stderr, "can't set creation mirror FAPL\n");
+ H5Eprint2(H5E_DEFAULT, stdout);
+ Hgoto_error(1);
+ }
+
+ /* Prepare parent "splitter" driver in UC_opts */
+ split_fa.wo_fapl_id = mirr_fapl_id;
+ split_fa.rw_fapl_id = H5P_DEFAULT;
+ UC_opts.fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (UC_opts.fapl_id == H5I_INVALID_HID) {
+ HDfprintf(stderr, "can't create creation FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_fapl_splitter(UC_opts.fapl_id, &split_fa) < 0) {
+ HDfprintf(stderr, "can't set creation FAPL\n");
+ H5Eprint2(H5E_DEFAULT, stdout);
+ Hgoto_error(1);
+ }
+
+ if (UC_opts.use_swmr) {
+ if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set write FAPL libver bounds\n");
+ Hgoto_error(1);
+ }
+ }
+
+ if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0),
+ UC_opts.fapl_id)) < 0) {
+ HDfprintf(stderr, "H5Fopen failed\n");
+ Hgoto_error(1);
+ }
+
+ if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
+ HDfprintf(stderr, "write_uc_file encountered error\n");
+ Hgoto_error(1);
+ }
+
+ if (H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "Failed to close write\n");
+ Hgoto_error(1);
+ }
+
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close write FAPL\n");
+ Hgoto_error(1);
+ }
+
+ if (H5Pclose(mirr_fapl_id) < 0) {
+ HDfprintf(stderr, "can't close write mirror FAPL\n");
+ Hgoto_error(1);
+ }
+
+ /* ================================================ */
+ /* If readwrite, collect exit code of child process */
+ /* ================================================ */
+ if (UC_opts.launch == UC_READWRITE) {
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
+ HDperror("waitpid");
+ Hgoto_error(1);
+ }
+
+ if (WIFEXITED(child_status)) {
+ if ((child_ret_value = WEXITSTATUS(child_status)) != 0) {
+ HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value);
+ Hgoto_error(2);
+ }
+ }
+ else {
+ HDprintf("%d: child process terminated abnormally\n", mypid);
+ Hgoto_error(2);
+ }
+ }
+
+done:
+ if (ret_value != 0) {
+ HDprintf("Error(s) encountered\n");
+ }
+ else {
+ HDprintf("All passed\n");
+ }
+
+ return (ret_value);
+}
+
+#else /* H5_HAVE_MIRROR_VFD */
+
+int
+main(void)
+{
+ HDfprintf(stderr, "Mirror VFD is not built. Skipping.\n");
+ return EXIT_SUCCESS;
+} /* end main() */
+
+#endif /* H5_HAVE_MIRROR_VFD */
+
+#else /* H5_HAVE_UNISTD_H */
+
+int
+main(void)
+{
+ HDfprintf(stderr, "Non-POSIX platform. Skipping.\n");
+ return EXIT_SUCCESS;
+} /* end main() */
+
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 53feed8..47c9f92 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -53,53 +53,48 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
-/* Global Variable definitions */
-options_t UC_opts; /* Use Case Options */
-const char *progname_g = "use_append_mchunks"; /* program name */
+#define USE_APPEND_MCHUNKS_PROGNAME "use_append_mchunks"
+
+static options_t UC_opts; /* Use Case Options */
/* Setup parameters for the use case.
* Return: 0 succeed; -1 fail.
*/
int
-setup_parameters(int argc, char *const argv[])
+setup_parameters(int argc, char *const argv[], options_t *opts)
{
/* use case defaults */
- HDmemset(&UC_opts, 0, sizeof(options_t));
- UC_opts.chunksize = Chunksize_DFT;
- UC_opts.use_swmr = 1; /* use swmr open */
- UC_opts.iterations = 1;
- UC_opts.chunkplanes = 1;
-
- /* parse options */
- if (parse_option(argc, argv) < 0) {
+ HDmemset(opts, 0, sizeof(options_t));
+ opts->chunksize = Chunksize_DFT;
+ opts->use_swmr = 1; /* use swmr open */
+ opts->iterations = 1;
+ opts->chunkplanes = 1;
+ opts->progname = USE_APPEND_MCHUNKS_PROGNAME;
+ opts->fapl_id = H5I_INVALID_HID;
+
+ if (parse_option(argc, argv, opts) < 0) {
return (-1);
}
- /* set chunk dims */
- UC_opts.chunkdims[0] = (hsize_t)UC_opts.chunkplanes;
- UC_opts.chunkdims[1] = UC_opts.chunkdims[2] = (hsize_t)UC_opts.chunksize;
-
- /* set dataset initial and max dims */
- UC_opts.dims[0] = 0;
- UC_opts.max_dims[0] = H5S_UNLIMITED;
- UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1] = UC_opts.max_dims[2] =
- 2 * (hsize_t)UC_opts.chunksize;
-
- /* set nplanes */
- if (UC_opts.nplanes == 0)
- UC_opts.nplanes = 2 * (hsize_t)UC_opts.chunksize;
-
- /* show parameters and return */
- show_parameters();
+
+ opts->chunkdims[0] = (hsize_t)opts->chunkplanes;
+ opts->chunkdims[1] = opts->chunkdims[2] = (hsize_t)opts->chunksize;
+
+ opts->dims[0] = 0;
+ opts->max_dims[0] = H5S_UNLIMITED;
+ opts->dims[1] = opts->dims[2] = opts->max_dims[1] = opts->max_dims[2] = 2 * (hsize_t)opts->chunksize;
+
+ if (opts->nplanes == 0)
+ opts->nplanes = 2 * (hsize_t)opts->chunksize;
+
+ show_parameters(opts);
return (0);
-}
+} /* end setup_parameters() */
/* Overall Algorithm:
* Parse options from user;
@@ -120,10 +115,8 @@ main(int argc, char *argv[])
hbool_t send_wait = 0;
hid_t fapl = -1; /* File access property list */
hid_t fid = -1; /* File ID */
- char * name; /* Test file name */
- /* initialization */
- if (setup_parameters(argc, argv) < 0) {
+ if (setup_parameters(argc, argv, &UC_opts) < 0) {
Hgoto_error(1);
}
@@ -138,27 +131,44 @@ main(int argc, char *argv[])
/* UC_WRITER: create datafile, skip reader, launch writer. */
/* UC_READER: skip create, launch reader, exit. */
/* ==============================================================*/
- /* ============*/
+ /* =========== */
/* Create file */
- /* ============*/
+ /* =========== */
if (UC_opts.launch != UC_READER) {
HDprintf("Creating skeleton data file for test...\n");
- if (create_uc_file() < 0) {
+ if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't create creation FAPL\n");
+ Hgoto_error(1);
+ }
+ if (H5Pset_libver_bounds(UC_opts.fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set creation FAPL libver bounds\n");
+ Hgoto_error(1);
+ }
+ if (create_uc_file(&UC_opts) < 0) {
HDfprintf(stderr, "***encounter error\n");
Hgoto_error(1);
}
- else
+ else {
HDprintf("File created.\n");
+ }
+ /* Close FAPL to prevent issues with forking later */
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close creation FAPL\n");
+ Hgoto_error(1);
+ }
+ UC_opts.fapl_id = H5I_INVALID_HID;
}
+ /* ============ */
+ /* Fork process */
+ /* ============ */
if (UC_opts.launch == UC_READWRITE) {
- /* fork process */
- if ((childpid = fork()) < 0) {
- perror("fork");
+ if ((childpid = HDfork()) < 0) {
+ HDperror("fork");
Hgoto_error(1);
- };
- };
- mypid = getpid();
+ }
+ }
+ mypid = HDgetpid();
/* ============= */
/* launch reader */
@@ -167,10 +177,18 @@ main(int argc, char *argv[])
/* child process launch the reader */
if (0 == childpid) {
HDprintf("%d: launch reader process\n", mypid);
- if (read_uc_file(send_wait) < 0) {
+ if ((UC_opts.fapl_id = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't create read FAPL\n");
+ HDexit(EXIT_FAILURE);
+ }
+ if (read_uc_file(send_wait, &UC_opts) < 0) {
HDfprintf(stderr, "read_uc_file encountered error\n");
HDexit(EXIT_FAILURE);
}
+ if (H5Pclose(UC_opts.fapl_id) < 0) {
+ HDfprintf(stderr, "can't close read FAPL\n");
+ HDexit(EXIT_FAILURE);
+ }
HDexit(EXIT_SUCCESS);
}
}
@@ -181,45 +199,46 @@ main(int argc, char *argv[])
/* this process continues to launch the writer */
HDprintf("%d: continue as the writer process\n", mypid);
- name = UC_opts.filename;
-
/* Set the file access property list */
- if ((fapl = h5_fileaccess()) < 0)
+ if ((fapl = h5_fileaccess()) < 0) {
+ HDfprintf(stderr, "can't get write FAPL\n");
Hgoto_error(1);
+ }
- if (UC_opts.use_swmr)
- if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ if (UC_opts.use_swmr) {
+ if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
+ HDfprintf(stderr, "can't set write FAPL libver bounds\n");
Hgoto_error(1);
+ }
+ }
- /* Open the file */
- if ((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) {
+ if ((fid = H5Fopen(UC_opts.filename, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) <
+ 0) {
HDfprintf(stderr, "H5Fopen failed\n");
Hgoto_error(1);
}
- if (write_uc_file(send_wait, fid) < 0) {
+ if (write_uc_file(send_wait, fid, &UC_opts) < 0) {
HDfprintf(stderr, "write_uc_file encountered error\n");
Hgoto_error(1);
}
+ if (H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "Failed to close file id\n");
+ Hgoto_error(1);
+ }
+
+ if (H5Pclose(fapl) < 0) {
+ HDfprintf(stderr, "can't close write FAPL\n");
+ Hgoto_error(1);
+ }
+
/* ================================================ */
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- perror("waitpid");
- Hgoto_error(1);
- }
-
- /* Close the file */
- if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Failed to close file id\n");
- Hgoto_error(1);
- }
-
- /* Close the property list */
- if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "Failed to close the property list\n");
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
+ HDperror("waitpid");
Hgoto_error(1);
}
@@ -236,7 +255,6 @@ main(int argc, char *argv[])
}
done:
- /* Print result and exit */
if (ret_value != 0) {
HDprintf("Error(s) encountered\n");
}
@@ -245,9 +263,9 @@ done:
}
return (ret_value);
-}
+} /* end main() */
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -256,4 +274,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_common.c b/test/use_common.c
index db46282..0ea2c83 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -13,18 +13,17 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
-#define H5D_TESTING
-#include "H5Dpkg.h"
-
+/* ----------------------------------------------------------------------------
+ * Print a common/shared usage message.
+ * Receives program name to show default test file name (<program_name>.h5).
+ * ----------------------------------------------------------------------------
+ */
void
usage(const char *prog)
{
@@ -42,10 +41,13 @@ usage(const char *prog)
HDfprintf(stderr, "\n");
} /* end usage() */
-/* Setup Use Case parameters by parsing command line options.
- * Setup default values if not set by options. */
+/* ----------------------------------------------------------------------------
+ * Setup Use Case parameters by parsing command line options.
+ * Includes default values for unspecified options.
+ * ----------------------------------------------------------------------------
+ */
int
-parse_option(int argc, char *const argv[])
+parse_option(int argc, char *const argv[], options_t *opts)
{
int ret_value = 0;
int c;
@@ -63,64 +65,64 @@ parse_option(int argc, char *const argv[])
break;
switch (c) {
case 'h':
- usage(progname_g);
+ usage(opts->progname);
HDexit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
- UC_opts.filename = optarg;
+ opts->filename = HDstrdup(optarg);
break;
case 'i': /* iterations */
- if ((UC_opts.iterations = HDatoi(optarg)) <= 0) {
+ if ((opts->iterations = HDatoi(optarg)) <= 0) {
HDfprintf(stderr, "bad iterations number %s, must be a positive integer\n", optarg);
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
- };
+ }
break;
case 'l': /* launch reader or writer only */
switch (*optarg) {
case 'r': /* reader only */
- UC_opts.launch = UC_READER;
+ opts->launch = UC_READER;
break;
case 'w': /* writer only */
- UC_opts.launch = UC_WRITER;
+ opts->launch = UC_WRITER;
break;
default:
HDfprintf(stderr, "launch value(%c) should be w or r only.\n", *optarg);
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
break;
- }
+ } /* end switch (reader/writer-only mode toggle) */
break;
case 'n': /* number of planes to write/read */
- if ((UC_opts.nplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
+ if ((opts->nplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
HDfprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
- };
+ }
break;
case 's': /* use swmr file open mode */
use_swmr = HDatoi(optarg);
if (use_swmr != 0 && use_swmr != 1) {
HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
}
- UC_opts.use_swmr = (hbool_t)use_swmr;
+ opts->use_swmr = (hbool_t)use_swmr;
break;
case 'y': /* Number of planes per chunk */
- if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
+ if ((opts->chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
HDfprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n",
optarg);
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
- };
+ }
break;
case 'z': /* size of chunk=(z,z) */
- if ((UC_opts.chunksize = HDstrtoull(optarg, NULL, 0)) <= 0) {
+ if ((opts->chunksize = HDstrtoull(optarg, NULL, 0)) <= 0) {
HDfprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
- usage(progname_g);
+ usage(opts->progname);
Hgoto_error(-1);
- };
+ }
break;
case '?':
HDfprintf(stderr, "getopt returned '%c'.\n", c);
@@ -129,105 +131,103 @@ parse_option(int argc, char *const argv[])
HDfprintf(stderr, "getopt returned unexpected value.\n");
HDfprintf(stderr, "Unexpected value is %d\n", c);
Hgoto_error(-1);
- }
- }
+ } /* end switch (argument symbol) */
+ } /* end while (there are still arguments) */
/* set test file name if not given */
- if (!UC_opts.filename) {
+ if (!opts->filename) {
/* default data file name is <progname>.h5 */
- if ((UC_opts.filename = (char *)HDmalloc(HDstrlen(progname_g) + 4)) == NULL) {
+ if ((opts->filename = (char *)HDmalloc(HDstrlen(opts->progname) + 4)) == NULL) {
HDfprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
- };
- HDstrcpy(UC_opts.filename, progname_g);
- HDstrcat(UC_opts.filename, ".h5");
+ }
+ HDstrcpy(opts->filename, opts->progname);
+ HDstrcat(opts->filename, ".h5");
}
done:
- /* All done. */
return (ret_value);
-}
+} /* end parse_option() */
-/* Show parameters used for this use case */
+/* ----------------------------------------------------------------------------
+ * Show parameters used for this use case.
+ * ----------------------------------------------------------------------------
+ */
void
-show_parameters(void)
+show_parameters(options_t *opts)
{
HDprintf("===Parameters used:===\n");
- printf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)UC_opts.chunkdims[0],
- (unsigned long long)UC_opts.chunkdims[1], (unsigned long long)UC_opts.chunkdims[2]);
- printf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)UC_opts.max_dims[0],
- (unsigned long long)UC_opts.max_dims[1], (unsigned long long)UC_opts.max_dims[2]);
- HDprintf("number of planes to write=%llu\n", (unsigned long long)UC_opts.nplanes);
- HDprintf("using SWMR mode=%s\n", UC_opts.use_swmr ? "yes(1)" : "no(0)");
- HDprintf("data filename=%s\n", UC_opts.filename);
+ HDprintf("chunk dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->chunkdims[0],
+ (unsigned long long)opts->chunkdims[1], (unsigned long long)opts->chunkdims[2]);
+ HDprintf("dataset max dims=(%llu, %llu, %llu)\n", (unsigned long long)opts->max_dims[0],
+ (unsigned long long)opts->max_dims[1], (unsigned long long)opts->max_dims[2]);
+ HDprintf("number of planes to write=%llu\n", (unsigned long long)opts->nplanes);
+ HDprintf("using SWMR mode=%s\n", opts->use_swmr ? "yes(1)" : "no(0)");
+ HDprintf("data filename=%s\n", opts->filename);
HDprintf("launch part=");
- switch (UC_opts.launch) {
+ switch (opts->launch) {
case UC_READWRITE:
- printf("Reader/Writer\n");
+ HDprintf("Reader/Writer\n");
break;
case UC_WRITER:
- printf("Writer\n");
+ HDprintf("Writer\n");
break;
case UC_READER:
- printf("Reader\n");
+ HDprintf("Reader\n");
break;
default:
/* should not happen */
- printf("Illegal part(%d)\n", UC_opts.launch);
- };
- HDprintf("number of iterations=%d (not used yet)\n", UC_opts.iterations);
+ HDprintf("Illegal part(%d)\n", opts->launch);
+ }
+ HDprintf("number of iterations=%d (not used yet)\n", opts->iterations);
HDprintf("===Parameters shown===\n");
-}
+} /* end show_parameters() */
-/* Create the skeleton use case file for testing.
+/* ----------------------------------------------------------------------------
+ * Create the skeleton use case file for testing.
* It has one 3d dataset using chunked storage.
* The dataset is (unlimited, chunksize, chunksize).
* Dataset type is 2 bytes integer.
* It starts out "empty", i.e., first dimension is 0.
*
* Return: 0 succeed; -1 fail.
+ * ----------------------------------------------------------------------------
*/
int
-create_uc_file(void)
+create_uc_file(options_t *opts)
{
hsize_t dims[3]; /* Dataset starting dimensions */
hid_t fid; /* File ID for new HDF5 file */
hid_t dcpl; /* Dataset creation property list */
hid_t sid; /* Dataspace ID */
hid_t dsid; /* Dataset ID */
- hid_t fapl; /* File access property list */
H5D_chunk_index_t idx_type; /* Chunk index type */
- /* Create the file */
- if ((fapl = h5_fileaccess()) < 0)
- return -1;
- if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
- if ((fid = H5Fcreate(UC_opts.filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if ((fid = H5Fcreate(opts->filename, H5F_ACC_TRUNC, H5P_DEFAULT, opts->fapl_id)) < 0)
return -1;
/* Set up dimension sizes */
dims[0] = 0;
- dims[1] = dims[2] = UC_opts.max_dims[1];
+ dims[1] = dims[2] = opts->max_dims[1];
/* Create dataspace for creating datasets */
- if ((sid = H5Screate_simple(3, dims, UC_opts.max_dims)) < 0)
+ if ((sid = H5Screate_simple(3, dims, opts->max_dims)) < 0)
return -1;
/* Create dataset creation property list */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
return -1;
- if (H5Pset_chunk(dcpl, 3, UC_opts.chunkdims) < 0)
+ if (H5Pset_chunk(dcpl, 3, opts->chunkdims) < 0)
return -1;
/* create dataset of progname */
- if ((dsid = H5Dcreate2(fid, progname_g, UC_DATATYPE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if ((dsid = H5Dcreate2(fid, opts->progname, UC_DATATYPE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
return -1;
/* Check that the chunk index type is not version 1 B-tree.
* Version 1 B-trees are not supported under SWMR.
*/
- if (H5D__layout_idx_type_test(dsid, &idx_type) < 0)
+ if (H5Dget_chunk_index_type(dsid, &idx_type) < 0)
return -1;
if (idx_type == H5D_CHUNK_IDX_BTREE) {
HDfprintf(stderr, "ERROR: Chunk index is version 1 B-tree: aborting.\n");
@@ -237,8 +237,6 @@ create_uc_file(void)
/* Close everything */
if (H5Dclose(dsid) < 0)
return -1;
- if (H5Pclose(fapl) < 0)
- return -1;
if (H5Pclose(dcpl) < 0)
return -1;
if (H5Sclose(sid) < 0)
@@ -247,23 +245,25 @@ create_uc_file(void)
return -1;
return 0;
-}
+} /* end create_uc_file() */
-/* Append planes, each of (1,2*chunksize,2*chunksize) to the dataset.
+/* ----------------------------------------------------------------------------
+ * Append planes, each of (1,2*chunksize,2*chunksize) to the dataset.
* In other words, 4 chunks are appended to the dataset at a time.
* Fill each plan with the plane number and then write it at the nth plane.
* Increase the plane number and repeat till the end of dataset, when it
* reaches chunksize long. End product is a (2*chunksize)^3 cube.
*
* Return: 0 succeed; -1 fail.
+ * ----------------------------------------------------------------------------
*/
int
-write_uc_file(hbool_t tosend, hid_t fid)
+write_uc_file(hbool_t tosend, hid_t file_id, options_t *opts)
{
hid_t dsid; /* dataset ID */
hid_t dcpl; /* Dataset creation property list */
UC_CTYPE *buffer, *bufptr; /* data buffer */
- hsize_t cz = UC_opts.chunksize; /* Chunk size */
+ hsize_t cz = opts->chunksize; /* Chunk size */
hid_t f_sid; /* dataset file space id */
hid_t m_sid; /* memory space id */
int rank; /* rank */
@@ -273,12 +273,13 @@ write_uc_file(hbool_t tosend, hid_t fid)
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
hsize_t i, j, k;
- if (tosend)
+ if (TRUE == tosend) {
/* Send a message that H5Fopen is complete--releasing the file lock */
h5_send_message(WRITER_MESSAGE, NULL, NULL);
+ }
/* Open the dataset of the program name */
- if ((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0) {
+ if ((dsid = H5Dopen2(file_id, opts->progname, H5P_DEFAULT)) < 0) {
HDfprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
@@ -298,7 +299,7 @@ write_uc_file(hbool_t tosend, hid_t fid)
}
/* verify chunk_dims against set paramenters */
- if (chunk_dims[0] != UC_opts.chunkdims[0] || chunk_dims[1] != cz || chunk_dims[2] != cz) {
+ if (chunk_dims[0] != opts->chunkdims[0] || chunk_dims[1] != cz || chunk_dims[2] != cz) {
HDfprintf(stderr, "chunk size is not as expected. Got dims=(%llu,%llu,%llu)\n",
(unsigned long long)chunk_dims[0], (unsigned long long)chunk_dims[1],
(unsigned long long)chunk_dims[2]);
@@ -307,12 +308,12 @@ write_uc_file(hbool_t tosend, hid_t fid)
/* allocate space for data buffer 1 X dims[1] X dims[2] of UC_CTYPE */
memdims[0] = 1;
- memdims[1] = UC_opts.dims[1];
- memdims[2] = UC_opts.dims[2];
+ memdims[1] = opts->dims[1];
+ memdims[2] = opts->dims[2];
if ((buffer = (UC_CTYPE *)HDmalloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
HDfprintf(stderr, "malloc: failed\n");
return -1;
- };
+ }
/*
* Get dataset rank and dimension.
@@ -340,21 +341,23 @@ write_uc_file(hbool_t tosend, hid_t fid)
if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) {
HDfprintf(stderr, "H5Screate_simple for memory failed\n");
return -1;
- };
+ }
/* write planes */
count[0] = 1;
count[1] = dims[1];
count[2] = dims[2];
- for (i = 0; i < UC_opts.nplanes; i++) {
+ for (i = 0; i < opts->nplanes; i++) {
/* fill buffer with value i+1 */
bufptr = buffer;
- for (j = 0; j < dims[1]; j++)
- for (k = 0; k < dims[2]; k++)
+ for (j = 0; j < dims[1]; j++) {
+ for (k = 0; k < dims[2]; k++) {
*bufptr++ = (UC_CTYPE)i;
+ }
+ }
/* Cork the dataset's metadata in the cache, if SWMR is enabled */
- if (UC_opts.use_swmr) {
+ if (opts->use_swmr) {
if (H5Odisable_mdc_flushes(dsid) < 0) {
HDfprintf(stderr, "H5Odisable_mdc_flushes failed\n");
return -1;
@@ -388,18 +391,19 @@ write_uc_file(hbool_t tosend, hid_t fid)
}
/* Uncork the dataset's metadata from the cache, if SWMR is enabled */
- if (UC_opts.use_swmr)
+ if (opts->use_swmr) {
if (H5Oenable_mdc_flushes(dsid) < 0) {
HDfprintf(stderr, "H5Oenable_mdc_flushes failed\n");
return -1;
}
+ }
/* flush file to make the just written plane available. */
if (H5Dflush(dsid) < 0) {
HDfprintf(stderr, "Failed to H5Fflush file\n");
return -1;
}
- }
+ } /* end for each plane to write */
/* Done writing. Free/Close all resources including data file */
HDfree(buffer);
@@ -417,9 +421,10 @@ write_uc_file(hbool_t tosend, hid_t fid)
}
return 0;
-}
+} /* end write_uc_file() */
-/* Read planes from the dataset.
+/* ----------------------------------------------------------------------------
+ * Read planes from the dataset.
* It expects the dataset is being changed (growing).
* It checks the unlimited dimension (1st one). When it increases,
* it will read in the new planes, one by one, and verify the data correctness.
@@ -428,26 +433,25 @@ write_uc_file(hbool_t tosend, hid_t fid)
* that is the expected end of data, the reader exits.
*
* Return: 0 succeed; -1 fail.
+ * ----------------------------------------------------------------------------
*/
int
-read_uc_file(hbool_t towait)
+read_uc_file(hbool_t towait, options_t *opts)
{
- hid_t fapl; /* file access property list ID */
- hid_t fid; /* File ID for new HDF5 file */
- hid_t dsid; /* dataset ID */
- char * name;
- UC_CTYPE *buffer, *bufptr; /* read data buffer */
+ hid_t fid; /* File ID for new HDF5 file */
+ hid_t dsid; /* dataset ID */
+ UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */
hid_t f_sid; /* dataset file space id */
hid_t m_sid; /* memory space id */
int rank; /* rank */
hsize_t dims[3]; /* Dataspace dimensions */
hsize_t memdims[3]; /* Memory space dimensions */
- hsize_t nplane = 0, nplane_old = 0; /* nth plane, last nth plane */
+ hsize_t nplane = 0, nplanes_seen = 0; /* nth plane, last nth plane */
hsize_t start[3] = {0, 0, 0}, count[3]; /* Hyperslab selection values */
hsize_t j, k;
int nreadererr = 0;
int nerrs;
- int nonewplane;
+ int loops_waiting_for_plane;
/* Before reading, wait for the message that H5Fopen is complete--file lock is released */
if (towait && h5_wait_message(WRITER_MESSAGE) < 0) {
@@ -455,34 +459,26 @@ read_uc_file(hbool_t towait)
return -1;
}
- name = UC_opts.filename;
-
- /* Open the file */
- if ((fapl = h5_fileaccess()) < 0)
- return -1;
- if ((fid = H5Fopen(name, H5F_ACC_RDONLY | (UC_opts.use_swmr ? H5F_ACC_SWMR_READ : 0), fapl)) < 0) {
+ HDfprintf(stderr, "Opening to read %s\n", opts->filename);
+ if ((fid = H5Fopen(opts->filename, H5F_ACC_RDONLY | (opts->use_swmr ? H5F_ACC_SWMR_READ : 0),
+ opts->fapl_id)) < 0) {
HDfprintf(stderr, "H5Fopen failed\n");
return -1;
}
- if (H5Pclose(fapl) < 0) {
- HDfprintf(stderr, "Failed to property list\n");
- return -1;
- }
- /* Open the dataset of the program name */
- if ((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0) {
+ if ((dsid = H5Dopen2(fid, opts->progname, H5P_DEFAULT)) < 0) {
HDfprintf(stderr, "H5Dopen2 failed\n");
return -1;
}
- /* allocate space for data buffer 1 X dims[1] X dims[2] of UC_CTYPE */
+ /* Allocate space for data buffer 1 X dims[1] X dims[2] of UC_CTYPE */
memdims[0] = 1;
- memdims[1] = UC_opts.dims[1];
- memdims[2] = UC_opts.dims[2];
+ memdims[1] = opts->dims[1];
+ memdims[2] = opts->dims[2];
if ((buffer = (UC_CTYPE *)HDmalloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) {
HDfprintf(stderr, "malloc: failed\n");
return -1;
- };
+ }
/*
* Get dataset rank and dimension.
@@ -509,47 +505,47 @@ read_uc_file(hbool_t towait)
return -1;
}
- /* setup mem-space for buffer */
+ /* Setup mem-space for buffer */
if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) {
HDfprintf(stderr, "H5Screate_simple for memory failed\n");
return -1;
- };
+ }
- /* Read 1 plane at a time whenever the dataset grows larger
- * (along dim[0]) */
+ /* Read 1 plane at a time whenever the dataset grows larger (along dim[0]) */
count[0] = 1;
count[1] = dims[1];
count[2] = dims[2];
/* quit when all nplanes have been read */
- nonewplane = 0;
- while (nplane_old < UC_opts.nplanes) {
+ loops_waiting_for_plane = 0;
+ while (nplanes_seen < opts->nplanes) {
/* print progress message according to if new planes are availalbe */
- if (nplane_old < dims[0]) {
- if (nonewplane) {
+ if (nplanes_seen < dims[0]) {
+ if (loops_waiting_for_plane) {
/* end the previous message */
HDprintf("\n");
- nonewplane = 0;
+ loops_waiting_for_plane = 0;
}
- HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplane_old,
+ HDprintf("reading planes %llu to %llu\n", (unsigned long long)nplanes_seen,
(unsigned long long)dims[0]);
}
else {
- if (nonewplane) {
+ if (loops_waiting_for_plane) {
HDprintf(".");
- if (nonewplane >= 30) {
+ if (loops_waiting_for_plane >= 30) {
HDfprintf(stderr, "waited too long for new plane, quit.\n");
return -1;
}
}
else {
/* print mesg only the first time; dots still no new plane */
- HDprintf("no new planes to read ");
+ HDprintf("waiting for new planes to read ");
}
- nonewplane++;
+ loops_waiting_for_plane++;
/* pause for a second */
HDsleep(1);
}
- for (nplane = nplane_old; nplane < dims[0]; nplane++) {
+
+ for (nplane = nplanes_seen; nplane < dims[0]; nplane++) {
/* read planes between last old nplanes and current extent */
/* Get the dataset's dataspace */
if ((f_sid = H5Dget_space(dsid)) < 0) {
@@ -580,58 +576,39 @@ read_uc_file(hbool_t towait)
HDfprintf(stderr, "found error %llu plane(%llu,%llu), expected %llu, got %d\n",
(unsigned long long)nplane, (unsigned long long)j,
(unsigned long long)k, (unsigned long long)nplane, (int)*(bufptr - 1));
- }
- }
- }
- }
+ } /* end if should print error */
+ } /* end if value mismatch */
+ } /* end for plane second dimension */
+ } /* end for plane first dimension */
if (nerrs) {
nreadererr++;
HDfprintf(stderr, "found %d unexpected values in plane %llu\n", nerrs,
(unsigned long long)nplane);
}
- }
- /* Have read all current planes */
- nplane_old = dims[0];
+ } /* end for each plane added since last read */
- /* check if dataset has grown since last time */
-#if 0
- /* close dsid and file, then reopen them */
- if (H5Dclose(dsid) < 0){
- HDfprintf(stderr, "H5Dclose failed\n");
- return -1;
- }
- if (H5Fclose(fid) < 0){
- HDfprintf(stderr, "H5Fclose failed\n");
- return -1;
- }
- if((fid = H5Fopen(name, H5F_ACC_RDONLY | (UC_opts.use_swmr ? H5F_ACC_SWMR_READ : 0), H5P_DEFAULT)) < 0){
- HDfprintf(stderr, "H5Fopen failed\n");
- return -1;
- }
- if((dsid = H5Dopen2(fid, progname_g, H5P_DEFAULT)) < 0){
- HDfprintf(stderr, "H5Dopen2 failed\n");
- return -1;
- }
-#else
+ nplanes_seen = dims[0];
+
+ /* check if dataset has grown since last time (update dims) */
H5Drefresh(dsid);
-#endif
f_sid = H5Dget_space(dsid); /* Get filespace handle first. */
if (H5Sget_simple_extent_dims(f_sid, dims, NULL) < 0) {
HDfprintf(stderr, "H5Sget_simple_extent_dims got error\n");
return -1;
}
- }
+ } /* end while (expecting more planes to read) */
- /* Close the file */
if (H5Fclose(fid) < 0) {
HDfprintf(stderr, "H5Fclose failed\n");
return -1;
}
+ HDfree(buffer);
+
if (nreadererr)
return -1;
else
return 0;
-} /* read_uc_file() */
+} /* end read_uc_file() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 1f0e3d4..f28e574 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,11 +18,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#define H5D_FRIEND /*suppress error about including H5Dpkg */
#define H5D_TESTING
@@ -539,7 +537,7 @@ done:
return (ret_value);
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -548,4 +546,4 @@ main(void)
HDexit(EXIT_SUCCESS);
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/vds.c b/test/vds.c
index ab0d7de..88ac4eb 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -5,13 +5,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.
@@ -33,11 +33,57 @@ const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1",
"vds_dapl", "vds_virt_2", "vds_virt_3", "vds_src_2", "vds_src_3",
"vds%%_src2", "vds_dapl2", NULL};
+/* Define to enable verbose test output */
+/* #define VDS_TEST_VERBOSE 1 */
+
+#ifdef VDS_TEST_VERBOSE
+
+/* For verbose output just use standard error printing */
+#define TESTING_2_SUPPRESSED(WHAT) TESTING_2(WHAT)
+#define PASSED_SUPPRESSED() PASSED()
+#define TEST_ERROR_SUPPRESSED TEST_ERROR
+
+/* Print config directly to output */
+#define PRINT_CONFIG(...) \
+ { \
+ HDprintf("Config: " __VA_ARGS__); \
+ HDputs(""); \
+ }
+
+#else /* VDS_TEST_VERBOSE */
+
+/* Global strings for error output */
+char vds_config_str_g[128] = "";
+char vds_test_str_g[128] = "";
+
+/* Replacement for TESTING_2 for non-verbose-output */
+#define TESTING_2_SUPPRESSED(WHAT) \
+ { \
+ HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
+ }
+
+/* Suppress output from PASSED() */
+#define PASSED_SUPPRESSED()
+
+/* Replacement for TEST_ERROR for non-verbose output */
+#define TEST_ERROR_SUPPRESSED \
+ { \
+ printf("Failed config: %s\nFailed test: %s\n", vds_config_str_g, vds_test_str_g); \
+ TEST_ERROR \
+ }
+
+/* Replacement for HDprintf for printing configuration for non-verbose output */
+#define PRINT_CONFIG(...) HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__);
+
+#endif /* VDS_TEST_VERBOSE */
+
/* I/O test config flags */
#define TEST_IO_CLOSE_SRC 0x01u
#define TEST_IO_DIFFERENT_FILE 0x02u
#define TEST_IO_REOPEN_VIRT 0x04u
-#define TEST_IO_NTESTS 0x08u
+#define TEST_IO_FCLOSE_SEMI 0x08u
+#define TEST_IO_FCLOSE_STRONG 0x10u
+#define TEST_IO_NTESTS 0x20u
#define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1)
@@ -488,22 +534,22 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
switch (config) {
case TEST_API_BASIC:
- TESTING("virtual dataset API functions")
+ TESTING_2("virtual dataset API functions")
break;
case TEST_API_COPY_PLIST:
- TESTING("virtual dataset API functions with copied plists")
+ TESTING_2("virtual dataset API functions with copied plists")
break;
case TEST_API_ENCDEC_PLIST:
- TESTING("virtual dataset API functions with encoded and decoded plists")
+ TESTING_2("virtual dataset API functions with encoded and decoded plists")
break;
case TEST_API_CREATE_DSET:
- TESTING("virtual dataset create")
+ TESTING_2("virtual dataset create")
break;
case TEST_API_REOPEN_DSET:
- TESTING("virtual dataset create with reopened dataset")
+ TESTING_2("virtual dataset create with reopened dataset")
break;
case TEST_API_REOPEN_FILE:
- TESTING("virtual dataset create with reopened file")
+ TESTING_2("virtual dataset create with reopened file")
break;
case TEST_API_NTESTS:
default:
@@ -1121,13 +1167,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_vds_prefix_first(unsigned config, hid_t fapl)
+test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
- char srcfilename[FILENAME_BUF_SIZE];
- char srcfilename_map[FILENAME_BUF_SIZE];
- char vfilename[FILENAME_BUF_SIZE];
- char srcfilenamepct[FILENAME_BUF_SIZE];
- char srcfilenamepct_map[FILENAME_BUF_SIZE];
+ char * srcfilename = NULL;
+ char * srcfilename_map = NULL;
+ char * vfilename = NULL;
+ char * srcfilenamepct = NULL;
+ char * srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
hid_t vfile = -1; /* File with virtual dset */
@@ -1145,86 +1191,97 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
- TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection")
-
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[8], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[8], fapl, srcfilename_map, sizeof srcfilename_map);
- h5_fixname(FILENAME[10], fapl, srcfilenamepct, sizeof srcfilenamepct);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+ TESTING_2_SUPPRESSED("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection")
+
+ if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[8], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[8], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[10], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* create tmp directory and get current working directory path */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Initialize VDS prefix items */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_prefix(dapl, TMPDIR) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDstrcmp(buffer, TMPDIR) != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all (should not be necessary, but just to be sure) */
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
if (NULL == HDgetcwd(buffer, 1024))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDchdir(TMPDIR) < 0)
- TEST_ERROR
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if (HDchdir(buffer) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1233,17 +1290,17 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1251,27 +1308,27 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j]) {
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
@@ -1282,62 +1339,68 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE) {
if (NULL == HDgetcwd(buffer, 1024))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDchdir(TMPDIR) < 0)
- TEST_ERROR
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if (HDchdir(buffer) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
- PASSED();
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(vfilename);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
+
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -1360,7 +1423,13 @@ error:
H5E_END_TRY;
if (HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(vfilename);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
return 1;
} /* end test_vds_prefix */
@@ -1376,14 +1445,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_basic_io(unsigned config, hid_t fapl)
+test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
- char srcfilename[FILENAME_BUF_SIZE];
- char srcfilename_map[FILENAME_BUF_SIZE];
- char vfilename[FILENAME_BUF_SIZE];
- char vfilename2[FILENAME_BUF_SIZE];
- char srcfilenamepct[FILENAME_BUF_SIZE];
- char srcfilenamepct_map[FILENAME_BUF_SIZE];
+ char * srcfilename = NULL;
+ char * srcfilename_map = NULL;
+ char * vfilename = NULL;
+ char * vfilename2 = NULL;
+ char * srcfilenamepct = NULL;
+ char * srcfilenamepct_map = NULL;
const char *srcfilenamepct_map_orig = "vds%%%%_src";
hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
hid_t vfile = -1; /* File with virtual dset */
@@ -1409,68 +1478,81 @@ test_basic_io(unsigned config, hid_t fapl)
herr_t ret; /* Generic return value */
int i, j, u, v;
- TESTING("basic virtual dataset I/O")
-
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
- h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+ TESTING_2_SUPPRESSED("basic virtual dataset I/O")
+
+ if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((vfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[1], vds_fapl, vfilename2, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: All - all selection
*/
/* Create source dataspace */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all (should not be necessary, but just to be sure) */
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1479,17 +1561,17 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1497,27 +1579,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1526,46 +1608,46 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -1574,70 +1656,70 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%%src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset2%%", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1646,22 +1728,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1669,27 +1751,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1698,40 +1780,40 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Ocopy() to same file */
/* Copy virtual dataset */
if (H5Ocopy(vfile, "v_dset", vfile, "v_dset2", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close v_dset */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
/* Adjust write buffer */
@@ -1741,22 +1823,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1764,36 +1846,36 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
/* Open v_dset2 */
if ((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through copied virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Only copy to a different file if the source datasets are in a different
@@ -1801,16 +1883,16 @@ test_basic_io(unsigned config, hid_t fapl)
if (config & TEST_IO_DIFFERENT_FILE) {
/* Close v_dset2 */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
/* Create file to copy virtual dataset to */
- if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Copy virtual dataset */
if (H5Ocopy(vfile, "v_dset", vfile2, "v_dset3", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1819,22 +1901,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1842,68 +1924,66 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen copied virtual file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile2) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile2 = -1;
- if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
/* Open v_dset3 */
if ((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through copied virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
-
- /* Close copied virtual file */
- if (H5Fclose(vfile2) < 0)
- TEST_ERROR
- vfile2 = -1;
}
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
+ if (vfile2 >= 0 && H5Fclose(vfile2) < 0)
+ TEST_ERROR_SUPPRESSED
+ vfile2 = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -1911,71 +1991,71 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%%src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset2%%", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1985,27 +2065,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2013,27 +2093,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2042,59 +2122,59 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -2103,70 +2183,70 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset2", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2175,22 +2255,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2198,38 +2278,38 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read first source dataset through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? buf[i][j] : 0))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second source dataset through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? 0 : buf[i][j]))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2238,7 +2318,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write first source dataset through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2247,25 +2327,25 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second source dataset through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2273,32 +2353,32 @@ test_basic_io(unsigned config, hid_t fapl)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2)
? (buf[i][j] - (int)(sizeof(buf) / sizeof(buf[0][0])))
: buf[i][j]))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -2306,19 +2386,19 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in source space */
start[0] = 0;
@@ -2326,10 +2406,10 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 13;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
@@ -2337,45 +2417,45 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 26;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2385,7 +2465,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2402,7 +2482,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2415,15 +2495,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2431,15 +2511,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset by hyperslab */
@@ -2448,7 +2528,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first slice */
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2460,7 +2540,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second slice */
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2474,7 +2554,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2484,7 +2564,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
/* Write first slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2501,7 +2581,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2514,12 +2594,12 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
@@ -2528,7 +2608,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, srcspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2540,7 +2620,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second dataset */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2554,35 +2634,35 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -2591,25 +2671,25 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[1] = 52;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace and file space for second operation (srcspace[1])
*/
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
@@ -2625,10 +2705,10 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs (checkerboard) in virtual spaces */
start[0] = 0;
@@ -2640,53 +2720,53 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2696,7 +2776,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2710,7 +2790,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 1; i < 10; i += 2)
@@ -2720,15 +2800,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2736,15 +2816,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset by hyperslab */
@@ -2753,17 +2833,17 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2776,7 +2856,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2786,7 +2866,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
/* Write first slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2800,7 +2880,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 1; i < 10; i += 2)
@@ -2810,12 +2890,12 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
@@ -2824,13 +2904,13 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2841,44 +2921,44 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second dataset */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -2887,11 +2967,11 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 3;
@@ -2899,18 +2979,18 @@ test_basic_io(unsigned config, hid_t fapl)
dims[2] = 3;
dims[3] = 3;
if ((vspace[0] = H5Screate_simple(4, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(4, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[0] = 2;
dims[1] = 4;
dims[2] = 4;
if ((srcspace[0] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
@@ -2930,10 +3010,10 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 1;
block[2] = 4;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs (corners) in first virtual space */
start[0] = 0;
@@ -2953,7 +3033,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[2] = 1;
block[3] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs ("+" pattern) in second virtual space */
start[0] = 1;
@@ -2973,61 +3053,61 @@ test_basic_io(unsigned config, hid_t fapl)
block[2] = 1;
block[3] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
start[2] = 1;
count[1] = 2;
count[2] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 1;
count[0] = 2;
count[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
count[0] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
start[3] = 1;
count[1] = 2;
count[3] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -3040,21 +3120,21 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 16;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -3062,15 +3142,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
@@ -3083,7 +3163,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
@@ -3099,11 +3179,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read first stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
HDmemset(erbuf, 0, sizeof(erbuf));
@@ -3125,7 +3205,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -3140,7 +3220,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3148,11 +3228,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 9; i++)
@@ -3176,10 +3256,10 @@ test_basic_io(unsigned config, hid_t fapl)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if ((j >= 3) && (j < 6)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -3194,7 +3274,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3202,11 +3282,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read third stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 9; i++)
@@ -3228,10 +3308,10 @@ test_basic_io(unsigned config, hid_t fapl)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if ((j >= 6) && (j < 9)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now read entire VDS */
/* Set memory space extent to 9x9, select all in order to reach part of the
@@ -3239,19 +3319,19 @@ test_basic_io(unsigned config, hid_t fapl)
dims[0] = 9;
dims[1] = 9;
if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read third stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf99[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(rbuf99) / sizeof(rbuf99[0])); i++)
for (j = 0; j < (int)(sizeof(rbuf99[0]) / sizeof(rbuf99[0][0])); j++)
if (rbuf99[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -3273,7 +3353,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
start[2] = 0;
@@ -3287,24 +3367,24 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset extent of memspace, select hyperslab */
dims[0] = 10;
dims[1] = 26;
if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 0;
count[0] = 1;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data through virtual dataset by hyperslab */
/* Write first stripe pattern */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
HDmemset(erbuf, 0, sizeof(erbuf));
@@ -3338,7 +3418,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 0;
start[2] = 1;
@@ -3352,7 +3432,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3360,11 +3440,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 1;
count[1] = 12;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
erbuf[0][4] = buf[0][0];
@@ -3399,7 +3479,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
start[2] = 2;
@@ -3413,7 +3493,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3421,11 +3501,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 1;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write third slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
erbuf[0][2] = buf[0][0];
@@ -3442,10 +3522,10 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
@@ -3455,61 +3535,61 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 16;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
/* Read dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now try writing to whole VDS (should fail due to unmapped elements) */
count[0] = 9;
count[1] = 9;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
H5E_BEGIN_TRY
{
ret = H5Dwrite(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]);
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -3518,77 +3598,77 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 8;
dims[1] = 15;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 4;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 4;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -3604,11 +3684,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 4;
count[1] = 15;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -3626,11 +3706,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 4; i < 6; i++)
@@ -3646,28 +3726,28 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -3680,7 +3760,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 1;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file */
start[0] = 2;
@@ -3688,48 +3768,48 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 4;
count[1] = 15;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -3738,90 +3818,90 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
dims[1] = 13;
dims[2] = 2;
if ((memspace = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 6;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[2] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 2;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 2;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 4;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -3839,11 +3919,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[1] = 5;
count[2] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -3862,11 +3942,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 2; i < 4; i++)
@@ -3883,11 +3963,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to third source dataset */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 4; i < 6; i++)
@@ -3904,31 +3984,31 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -3945,54 +4025,54 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 3;
block[2] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(vspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[2] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -4001,30 +4081,30 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 9;
dims[2] = 6;
if ((vspace[0] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 12;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
@@ -4040,49 +4120,49 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 1;
block[2] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[2] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Initialize erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -4103,11 +4183,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 12;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -4128,11 +4208,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[1] = 8;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -4153,28 +4233,28 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -4187,7 +4267,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file */
start[0] = 0;
@@ -4197,56 +4277,63 @@ test_basic_io(unsigned config, hid_t fapl)
count[1] = 4;
count[2] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
- PASSED();
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(vfilename);
+ HDfree(vfilename2);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
+
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -4268,6 +4355,13 @@ error:
}
H5E_END_TRY;
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(vfilename);
+ HDfree(vfilename2);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
+
return 1;
} /* end test_basic_io() */
@@ -4281,7 +4375,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_unlim(unsigned config, hid_t fapl)
+test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
@@ -4312,52 +4406,52 @@ test_unlim(unsigned config, hid_t fapl)
H5D_vds_view_t virtual_view; /* Virtual view property */
int i, j;
- TESTING("virtual dataset I/O with unlimited selections")
+ TESTING_2_SUPPRESSED("virtual dataset I/O with unlimited selections")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map);
/* Create DCPLs */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set chunk dimensions */
if (H5Pset_chunk(srcdcpl, 2, cdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DAPL */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: 2 Source datasets, single unlimited hyperslab virtual mappings
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 5;
mdims[0] = 5;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[0] = 10;
/* Select hyperslab in source space */
@@ -4366,49 +4460,49 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4425,11 +4519,11 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4443,7 +4537,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4453,15 +4547,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4469,40 +4563,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4511,74 +4605,74 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[0] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Test H5Pget_virtual_view() */
if (H5Pget_virtual_view(dapl, &virtual_view) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (virtual_view != H5D_VDS_LAST_AVAILABLE)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_view() */
if (H5Pget_virtual_view(dapl, &virtual_view) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (virtual_view != H5D_VDS_FIRST_MISSING)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4586,33 +4680,33 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[0] = 5;
dims[1] = 15;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4622,26 +4716,26 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 10;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4649,42 +4743,42 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING and we only extended one source dataset the
* dimensions will not have changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4693,38 +4787,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE */
@@ -4734,27 +4828,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4763,37 +4857,37 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 5;
dims[1] = 20;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4803,16 +4897,16 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 10;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4822,12 +4916,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4835,40 +4929,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4877,17 +4971,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now just read middle 2 rows */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -4895,9 +4989,9 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 20;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read so we don't have to wipe out erbuf and then restore it afterwards */
@@ -4905,24 +4999,24 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4932,23 +5026,23 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now try setting extent manually */
/* Shrink to 18 */
dims[1] = 18;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4958,27 +5052,27 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Shrink to 15 */
dims[1] = 15;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4988,63 +5082,63 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5054,36 +5148,36 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5092,28 +5186,28 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Grow to 18 */
dims[1] = 18;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5123,27 +5217,27 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Grow to 20 */
dims[1] = 20;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5153,50 +5247,50 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -5204,21 +5298,21 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
mdims[1] = 10;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[1] = 20;
/* Select hyperslab in source space */
@@ -5227,7 +5321,7 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -5237,46 +5331,46 @@ test_unlim(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5293,11 +5387,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5311,7 +5405,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5321,15 +5415,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5337,40 +5431,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5378,62 +5472,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5441,32 +5535,32 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[1] = 7;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5476,17 +5570,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 5;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect only new data that is now visible under
* H5D_VDS_FIRST_MISSING (first slice) */
@@ -5496,12 +5590,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5509,42 +5603,42 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING and we only extended one source dataset the
* dimension will only have changed to add one more slice. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 11)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5552,38 +5646,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE (second new slice) */
@@ -5592,27 +5686,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 13)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5620,36 +5714,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[1] = 10;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5659,17 +5753,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 5;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5679,12 +5773,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5692,40 +5786,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5733,17 +5827,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now just read middle 2 rows */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -5751,10 +5845,10 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 20;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read so we don't have to wipe out erbuf and then restore it afterwards */
@@ -5762,26 +5856,26 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is no longer visible due to the
* change to H5D_VDS_FIRST_MISSING */
@@ -5791,27 +5885,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 14)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5819,54 +5913,54 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -5874,31 +5968,31 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[1] = 4;
mdims[1] = 8;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 4;
mdims[1] = 6;
if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 2;
mdims[1] = 6;
if ((srcspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[1] = 20;
/* Select hyperslab in source spaces */
@@ -5907,11 +6001,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[2], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -5921,55 +6015,55 @@ test_unlim(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 2;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3",
srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5986,11 +6080,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -6006,7 +6100,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -6024,11 +6118,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write third dataset */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6039,18 +6133,18 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6058,40 +6152,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6099,62 +6193,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6162,32 +6256,32 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[1] = 7;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6197,27 +6291,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6225,41 +6319,41 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING the size will not have changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6267,38 +6361,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE */
@@ -6310,27 +6404,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6338,36 +6432,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[2] */
dims[1] = 5;
if (H5Dset_extent(srcdset[2], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6377,17 +6471,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[2])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 2;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6399,12 +6493,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6412,41 +6506,41 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that the dimensions will not have
* changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6454,62 +6548,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 14)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6517,36 +6611,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[1] = 6;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6556,17 +6650,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6577,12 +6671,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6590,40 +6684,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 17)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6631,58 +6725,58 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6690,21 +6784,21 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now just read middle 2 rows */
@@ -6713,16 +6807,16 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 19;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read */
@@ -6730,55 +6824,55 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[2] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -6786,23 +6880,23 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[0] = 5;
dims[1] = 0;
mdims[0] = 5;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 5;
if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[0] = 10;
/* Select hyperslab in source spaces */
@@ -6811,53 +6905,53 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[1] = 10;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6876,11 +6970,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -6890,15 +6984,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6906,40 +7000,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6949,62 +7043,62 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7012,33 +7106,33 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[0] = 5;
dims[1] = 5;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7051,9 +7145,9 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -7063,12 +7157,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7076,40 +7170,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7119,62 +7213,62 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7184,74 +7278,74 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(srcdcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -7289,85 +7383,101 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_printf(unsigned config, hid_t fapl)
+test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
- char srcfilename[FILENAME_BUF_SIZE];
- char srcfilename_map[FILENAME_BUF_SIZE];
- char srcfilename2[FILENAME_BUF_SIZE];
- char srcfilename2_map[FILENAME_BUF_SIZE];
- char vfilename[FILENAME_BUF_SIZE];
- char printf_srcfilename_map[FILENAME_BUF_SIZE];
+ char * srcfilename = NULL;
+ char * srcfilename_map = NULL;
+ char * srcfilename2 = NULL;
+ char * srcfilename2_map = NULL;
+ char * vfilename = NULL;
+ char * printf_srcfilename_map = NULL;
+ char * srcfilenamepct = NULL;
+ char * srcfilenamepct_map = NULL;
const char *printf_srcfilename_map_orig = "vds_src_%b";
- char srcfilenamepct[FILENAME_BUF_SIZE];
- char srcfilenamepct_map[FILENAME_BUF_SIZE];
- const char *srcfilenamepct_map_orig = "vds%%%%_src";
- hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
- hid_t vfile = -1; /* File with virtual dset */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t dapl = -1; /* Dataset access property list */
- hid_t srcspace = -1; /* Source dataspace */
- hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */
- hid_t memspace = -1; /* Memory dataspace */
- hid_t filespace = -1; /* File dataspace */
- hid_t srcdset[6] = {-1, -1, -1, -1, -1, -1}; /* Source datsets */
- hid_t vdset = -1; /* Virtual dataset */
- hsize_t dims[2] = {10, 0}; /* Data space current size */
- hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
- hsize_t start[2] = {0, 0}; /* Hyperslab start */
- hsize_t stride[2]; /* Hyperslab stride */
- hsize_t count[2]; /* Hyperslab count */
- hsize_t block[2]; /* Hyperslab block */
- int buf[10][20]; /* Write and expected read buffer */
- int rbuf[10][20]; /* Read buffer */
- int erbuf[10][20]; /* Expected read buffer */
- int ndims; /* Number of dimensions */
- int fill = -1; /* Fill value */
- hsize_t gap_size; /* Gap size property */
+ const char *srcfilenamepct_map_orig = "vds%%%%_src";
+ hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
+ hid_t vfile = -1; /* File with virtual dset */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t dapl = -1; /* Dataset access property list */
+ hid_t srcspace = -1; /* Source dataspace */
+ hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */
+ hid_t memspace = -1; /* Memory dataspace */
+ hid_t filespace = -1; /* File dataspace */
+ hid_t srcdset[6] = {-1, -1, -1, -1, -1, -1}; /* Source datsets */
+ hid_t vdset = -1; /* Virtual dataset */
+ hsize_t dims[2] = {10, 0}; /* Data space current size */
+ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */
+ hsize_t start[2] = {0, 0}; /* Hyperslab start */
+ hsize_t stride[2]; /* Hyperslab stride */
+ hsize_t count[2]; /* Hyperslab count */
+ hsize_t block[2]; /* Hyperslab block */
+ int buf[10][20]; /* Write and expected read buffer */
+ int rbuf[10][20]; /* Read buffer */
+ int erbuf[10][20]; /* Expected read buffer */
+ int ndims; /* Number of dimensions */
+ int fill = -1; /* Fill value */
+ hsize_t gap_size; /* Gap size property */
int i, j;
- TESTING("virtual dataset I/O with printf source")
-
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
- h5_fixname(FILENAME[3], fapl, srcfilename2, sizeof srcfilename2);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename2_map, sizeof srcfilename2_map);
- h5_fixname_printf(printf_srcfilename_map_orig, fapl, printf_srcfilename_map,
- sizeof printf_srcfilename_map);
- h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+ TESTING_2_SUPPRESSED("virtual dataset I/O with printf source")
+
+ if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilename2_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((printf_srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+ if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
+ TEST_ERROR_SUPPRESSED;
+
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[3], src_fapl, srcfilename2, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename2_map, FILENAME_BUF_SIZE);
+ h5_fixname_printf(printf_srcfilename_map_orig, src_fapl, printf_srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DAPL */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: 1 Source dataset mapping, 10x5 blocks
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -7377,91 +7487,91 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset%b",
srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7475,9 +7585,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7491,7 +7601,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7501,15 +7611,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7517,40 +7627,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7558,32 +7668,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7592,9 +7702,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7604,12 +7714,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7617,36 +7727,36 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7654,21 +7764,21 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try with different selections */
@@ -7680,25 +7790,25 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file space */
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
start[1] = 0;
@@ -7706,11 +7816,11 @@ test_printf(unsigned config, hid_t fapl)
/* Now try writing through VDS */
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file space */
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7719,83 +7829,83 @@ test_printf(unsigned config, hid_t fapl)
/* Write data through VDS */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset0", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read srcdset[0] */
count[0] = 10;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read srcdset[1] */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j + 5])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read srcdset[2] */
if (H5Dread(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j + 10])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -7804,16 +7914,16 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 1;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -7823,104 +7933,104 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source datasets in a pattern with increasing gaps:
* XX-X--X---X----X */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset6", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[4] = H5Dcreate2(srcfile[0], "src_dset10", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[5] = H5Dcreate2(srcfile[0], "src_dset15", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7934,9 +8044,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7949,7 +8059,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7962,7 +8072,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7975,7 +8085,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7988,7 +8098,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[4] */
if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8001,7 +8111,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[5] */
if (H5Dwrite(srcdset[5], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8011,13 +8121,13 @@ test_printf(unsigned config, hid_t fapl)
if (config & TEST_IO_CLOSE_SRC) {
for (i = 0; i < 6; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -8025,40 +8135,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8066,74 +8176,74 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with printf gap set to 1, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8141,68 +8251,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 2, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)2) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8210,68 +8320,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 3, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)3) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)3)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 11)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8279,68 +8389,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 4, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)4) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 16)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8348,62 +8458,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8411,56 +8521,56 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 6; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/* Next 2 tests are always run with a different source file, so only run if
@@ -8471,21 +8581,21 @@ test_printf(unsigned config, hid_t fapl)
* Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file
*/
/* Clean up files so the source files do not exist yet */
- H5Iinc_ref(fapl); /* Prevent FAPL from being closed */
- h5_clean_files(FILENAME, fapl);
+ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */
+ h5_clean_files(FILENAME, vds_fapl);
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -8495,66 +8605,66 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "src_dset", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create 2 source files, one source dataset */
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
- if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8568,9 +8678,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8580,53 +8690,53 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset and srcfiles if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8634,32 +8744,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC)
- if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2nd source dataset */
if ((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8668,9 +8778,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8680,50 +8790,50 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8731,49 +8841,49 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -8781,21 +8891,21 @@ test_printf(unsigned config, hid_t fapl)
* source dset, extra %%s in source dataset name
*/
/* Clean up files so the source files do not exist yet */
- H5Iinc_ref(fapl); /* Prevent FAPL from being closed */
- h5_clean_files(FILENAME, fapl);
+ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */
+ h5_clean_files(FILENAME, vds_fapl);
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -8805,66 +8915,66 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "%%src%%_dset%%%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create 2 source files, one source dataset */
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
- if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8878,9 +8988,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8890,53 +9000,53 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset and srcfiles if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8944,32 +9054,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC)
- if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2nd source dataset */
if ((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8978,9 +9088,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8990,50 +9100,50 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9041,49 +9151,49 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
}
@@ -9093,26 +9203,26 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace (2 elements wide) */
dims[1] = 2;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in source space */
count[0] = 10;
count[1] = 1;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -9122,98 +9232,98 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%bsrc_dset_a%b%%", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_b%b%%%%", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "0src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9229,9 +9339,9 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9244,7 +9354,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9253,15 +9363,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9269,40 +9379,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9310,32 +9420,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_b1%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9344,9 +9454,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9355,12 +9465,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9368,40 +9478,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9409,63 +9519,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is no longer
* visible due to the change to H5D_VDS_FIRST_MISSING. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9473,32 +9583,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 4th source dataset */
if ((srcdset[3] = H5Dcreate2(srcfile[0], "2src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9507,9 +9617,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9518,12 +9628,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[3] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9531,40 +9641,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9572,63 +9682,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is now visible
* due to the change to H5D_VDS_LAST_AVAILABLE. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9636,63 +9746,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf_gap set to 1, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 6th slice is now visible
* due to the change to printf_gap. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9700,59 +9810,59 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 4; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -9760,25 +9870,25 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace (1 dimensional) */
dims[0] = 50;
if ((srcspace = H5Screate_simple(1, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in source space */
count[0] = 25;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -9788,103 +9898,103 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 5;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
stride[1] = 10;
block[1] = 10;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
/* Add virtual layout mappings (select ALL in source space for second
* mapping) */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_a%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_b%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9900,12 +10010,12 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 5;
block[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
count[0] = 25;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -9920,11 +10030,11 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
block[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -9934,15 +10044,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9950,40 +10060,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9991,63 +10101,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is no longer
* visible due to the change to H5D_VDS_FIRST_MISSING. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10055,32 +10165,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_a1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10090,11 +10200,11 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
block[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -10104,12 +10214,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10117,40 +10227,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10158,62 +10268,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. There should be no change. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10221,32 +10331,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 4th source dataset */
if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10255,9 +10365,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -10267,12 +10377,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[3] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10280,40 +10390,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10321,36 +10431,36 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10358,28 +10468,28 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Shrink to 12 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10387,27 +10497,27 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Shrink to 10 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10415,63 +10525,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10479,36 +10589,36 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10516,28 +10626,28 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Grow to 12 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10545,27 +10655,27 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Grow to 15 */
dims[1] = 15;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10573,58 +10683,58 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Reset dapl */
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 4; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -10633,16 +10743,16 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 1;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -10652,88 +10762,88 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 1 source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10747,9 +10857,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -10758,12 +10868,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10771,40 +10881,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10812,62 +10922,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 127, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)127) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10875,66 +10985,75 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
- PASSED();
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(srcfilename2);
+ HDfree(srcfilename2_map);
+ HDfree(vfilename);
+ HDfree(printf_srcfilename_map);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
+
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -10956,6 +11075,15 @@ error:
}
H5E_END_TRY;
+ HDfree(srcfilename);
+ HDfree(srcfilename_map);
+ HDfree(srcfilename2);
+ HDfree(srcfilename2_map);
+ HDfree(vfilename);
+ HDfree(printf_srcfilename_map);
+ HDfree(srcfilenamepct);
+ HDfree(srcfilenamepct_map);
+
return 1;
} /* end test_printf() */
@@ -10970,7 +11098,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_all(unsigned config, hid_t fapl)
+test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char vfilename[FILENAME_BUF_SIZE];
char srcfilename[FILENAME_BUF_SIZE];
@@ -10999,52 +11127,52 @@ test_all(unsigned config, hid_t fapl)
int fill = -1; /* Fill value */
int i, j;
- TESTING("virtual dataset I/O with mixed selection types")
+ TESTING_2_SUPPRESSED("virtual dataset I/O with mixed selection types")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map);
/* Create DCPLs */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set chunk dimensions */
if (H5Pset_chunk(srcdcpl, 2, cdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create fixed mapping */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 3;
count[0] = 3;
count[1] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[0] = H5Screate_simple(2, count, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_fixed", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create unlimited mapping */
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 0;
count[0] = 1;
@@ -11052,21 +11180,21 @@ test_all(unsigned config, hid_t fapl)
block[0] = H5S_UNLIMITED;
block[1] = 3;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[0] = 0;
dims[1] = 3;
if ((srcspace[1] = H5Screate_simple(2, dims, block)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_unlim", srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create printf mapping */
if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 2;
stride[0] = 1;
@@ -11076,93 +11204,93 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[2] = H5Screate_simple(2, block, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_printf_%b", srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile = vfile;
if (H5Iinc_ref(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create fixed source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile, "src_dset_fixed", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create unlimited source_dataset */
if ((srcdset[1] = H5Dcreate2(srcfile, "src_dset_unlim", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11180,9 +11308,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11193,13 +11321,13 @@ test_all(unsigned config, hid_t fapl)
if (config & TEST_IO_CLOSE_SRC) {
for (i = 0; i < 2; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11207,40 +11335,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11250,37 +11378,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 2;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11291,9 +11419,9 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 2; i++)
@@ -11303,11 +11431,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11315,40 +11443,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11358,32 +11486,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create first printf source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile, "src_dset_printf_0", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
srcdcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11396,9 +11524,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11408,11 +11536,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[2] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11420,40 +11548,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11463,37 +11591,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 3;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11506,17 +11634,17 @@ test_all(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 2;
start[1] = 0;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11525,11 +11653,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11537,40 +11665,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11580,32 +11708,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create second printf source dataset, this time without using srcdcpl */
if ((srcdset[3] = H5Dcreate2(srcfile, "src_dset_printf_1", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11618,9 +11746,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11630,11 +11758,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[3] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11642,40 +11770,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11685,37 +11813,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 7;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11728,17 +11856,17 @@ test_all(unsigned config, hid_t fapl)
block[0] = 4;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 0;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 4; i++)
@@ -11748,11 +11876,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11760,40 +11888,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11803,32 +11931,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create third printf source dataset */
if ((srcdset[4] = H5Dcreate2(srcfile, "src_dset_printf_2", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
srcdcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11841,9 +11969,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11853,11 +11981,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[4] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[4]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[4] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11865,40 +11993,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11908,61 +12036,61 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 5; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
for (i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
if (H5Sclose(srcspace[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[i] = -1;
}
for (i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
if (H5Sclose(vspace[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[i] = -1;
}
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(srcdcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdcpl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -12017,7 +12145,7 @@ test_dapl_values(hid_t fapl_id)
hsize_t gap_size; /* gap size from dapl */
char filename[1024]; /* file names */
- TESTING("H5Dget_access_plist() returns dapl w/ correct values");
+ TESTING_2("H5Dget_access_plist() returns dapl w/ correct values");
/* Create the file */
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
@@ -12156,7 +12284,8 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t fapl;
- hid_t my_fapl = -1; /* File access property list */
+ hid_t vds_fapl = -1; /* File access property list */
+ hid_t src_fapl = -1; /* File access property list */
int test_api_config;
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
@@ -12168,16 +12297,21 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
- /* Set to use the latest file format */
- if ((my_fapl = H5Pcopy(fapl)) < 0)
+ /* Create FAPLs for VDS and source files */
+ if ((vds_fapl = H5Pcopy(fapl)) < 0)
+ TEST_ERROR
+ if ((src_fapl = H5Pcopy(fapl)) < 0)
TEST_ERROR
/* Loop through all the combinations of low/high version bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
for (high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
- char msg[80]; /* Message for file version bounds */
+ char msg[128]; /* Message for file version bounds */
const char *low_string; /* The low bound string */
const char *high_string; /* The high bound string */
+#ifndef VDS_TEST_VERBOSE
+ int tmp_nerrors;
+#endif /* VDS_TEST_VERBOSE */
/* Invalid combinations, just continue */
if (high == H5F_LIBVER_EARLIEST || high < low)
@@ -12188,39 +12322,83 @@ main(void)
continue;
/* Set the low/high version bounds */
- if (H5Pset_libver_bounds(my_fapl, low, high) < 0)
+ if (H5Pset_libver_bounds(vds_fapl, low, high) < 0)
+ TEST_ERROR
+ if (H5Pset_libver_bounds(src_fapl, low, high) < 0)
TEST_ERROR
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsprintf(msg, "Testing virtual dataset with file version bounds: (%s, %s):", low_string,
- high_string);
+ HDsnprintf(msg, sizeof(msg),
+ "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
+ high_string);
HDputs(msg);
for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS;
test_api_config++)
- nerrors += test_api((test_api_config_t)test_api_config, my_fapl, low);
+ nerrors += test_api((test_api_config_t)test_api_config, vds_fapl, low);
+
+ TESTING_2("Virtual dataset I/O")
+#ifdef VDS_TEST_VERBOSE
+ HDputs("");
+#else /* VDS_TEST_VERBOSE */
+ tmp_nerrors = nerrors;
+#endif /* VDS_TEST_VERBOSE */
+
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
- HDprintf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
- bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
- bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
- nerrors += test_basic_io(bit_config, my_fapl);
- nerrors += test_vds_prefix_first(bit_config, my_fapl);
- nerrors += test_unlim(bit_config, my_fapl);
- nerrors += test_printf(bit_config, my_fapl);
- nerrors += test_all(bit_config, my_fapl);
+ /* Skip invalid configurations */
+ if ((bit_config & TEST_IO_FCLOSE_SEMI) && (bit_config & TEST_IO_FCLOSE_STRONG))
+ continue;
+
+ /* Print message */
+ PRINT_CONFIG(
+ "%s%s%s, %s file close degree",
+ bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
+ bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
+ bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "",
+ bit_config & TEST_IO_FCLOSE_SEMI
+ ? "H5F_CLOSE_SEMI"
+ : (bit_config & TEST_IO_FCLOSE_STRONG ? "H5F_CLOSE_STRONG" : "H5F_CLOSE_WEAK"));
+
+ /* Set file close degree */
+ if (bit_config & TEST_IO_FCLOSE_SEMI) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_SEMI) < 0)
+ TEST_ERROR
+ }
+ else if (bit_config & TEST_IO_FCLOSE_STRONG) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_STRONG) < 0)
+ TEST_ERROR
+ }
+ else {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_WEAK) < 0)
+ TEST_ERROR
+ }
+
+ /* Run tests */
+ nerrors += test_basic_io(bit_config, vds_fapl, src_fapl);
+ nerrors += test_vds_prefix_first(bit_config, vds_fapl, src_fapl);
+ nerrors += test_unlim(bit_config, vds_fapl, src_fapl);
+ nerrors += test_printf(bit_config, vds_fapl, src_fapl);
+ nerrors += test_all(bit_config, vds_fapl, src_fapl);
}
- nerrors += test_dapl_values(my_fapl);
+#ifndef VDS_TEST_VERBOSE
+ if (tmp_nerrors == nerrors)
+ PASSED();
+#endif /* VDS_TEST_VERBOSE */
+
+ nerrors += test_dapl_values(vds_fapl);
/* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, my_fapl) < 0 ? 1 : 0);
+ nerrors += (h5_verify_cached_stabs(FILENAME, vds_fapl) < 0 ? 1 : 0);
} /* end for high */
} /* end for low */
- if (H5Pclose(my_fapl) < 0)
+ if (H5Pclose(vds_fapl) < 0)
+ TEST_ERROR
+ if (H5Pclose(src_fapl) < 0)
TEST_ERROR
if (nerrors)
diff --git a/test/vds_env.c b/test/vds_env.c
index df5eab5..58d90fc 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -5,13 +5,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.
diff --git a/test/vds_swmr.h b/test/vds_swmr.h
index b39d7f1..d1dfd64 100644
--- a/test/vds_swmr.h
+++ b/test/vds_swmr.h
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -94,6 +94,4 @@ H5TEST_DLLVAR char VDS_FILE_NAME[NAME_LEN];
/* Dataset names */
H5TEST_DLLVAR char SOURCE_DSET_PATH[NAME_LEN];
H5TEST_DLLVAR char VDS_DSET_NAME[NAME_LEN];
-
-/* Fill values */
#endif /* VDS_SWMR_H */
diff --git a/test/vds_swmr_gen.c b/test/vds_swmr_gen.c
index 50687a9..3ea05d7 100644
--- a/test/vds_swmr_gen.c
+++ b/test/vds_swmr_gen.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index bdb73b8..e16707f 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index 32ef4c7..0c10b45 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -6,7 +6,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/vfd.c b/test/vfd.c
index b49c2da..237086a 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -6,13 +6,13 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
*
* Purpose: Tests the basic features of Virtual File Drivers
@@ -25,6 +25,7 @@
#define FAMILY_SIZE (1 * KB)
#define FAMILY_SIZE2 (5 * KB)
#define MULTI_SIZE 128
+#define SPLITTER_SIZE 8 /* dimensions of a dataset */
#define CORE_INCREMENT (4 * KB)
#define CORE_PAGE_SIZE (1024 * KB)
@@ -58,12 +59,50 @@ const char *FILENAME[] = {"sec2_file", /*0*/
"windows_file", /*8*/
"new_multi_file_v16", /*9*/
"ro_s3_file", /*10*/
+ "splitter_rw_file", /*11*/
+ "splitter_wo_file", /*12*/
+ "splitter.log", /*13*/
NULL};
#define LOG_FILENAME "log_vfd_out.log"
#define COMPAT_BASENAME "family_v16_"
#define MULTI_COMPAT_BASENAME "multi_file_v16"
+#define SPLITTER_DATASET_NAME "dataset"
+
+/* Macro: HEXPRINT()
+ * Helper macro to pretty-print hexadecimal output of a buffer of known size.
+ * Each line has the address of the first printed byte, and four columns of
+ * four-byte data.
+ */
+static int __k;
+#define HEXPRINT(size, buf) \
+ for (__k = 0; __k < (size); __k++) { \
+ if (__k % 16 == 0) { \
+ HDprintf("\n%04x", __k); \
+ } \
+ HDprintf((__k % 4 == 0) ? " %02X" : " %02X", (unsigned char)(buf)[__k]); \
+ } /* end #define HEXPRINT() */
+
+/* Helper structure to pass around dataset information.
+ */
+struct splitter_dataset_def {
+ void * buf; /* contents of dataset */
+ const char * dset_name; /* dataset name, always added to root group */
+ hid_t mem_type_id; /* datatype */
+ const hsize_t *dims; /* dimensions */
+ int n_dims; /* rank */
+};
+
+static int splitter_prepare_file_paths(H5FD_splitter_vfd_config_t *vfd_config, char *filename_rw_out);
+static int splitter_create_single_file_at(const char *filename, hid_t fapl_id,
+ const struct splitter_dataset_def *data);
+static int splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def *data);
+static int run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
+ hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2]);
+static int splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id);
+static int splitter_tentative_open_test(hid_t child_fapl_id);
+static int file_exists(const char *filename, hid_t fapl_id);
/*-------------------------------------------------------------------------
* Function: test_sec2
@@ -788,7 +827,7 @@ error:
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -853,15 +892,14 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_family
*
* Purpose: Tests the file handle interface for FAMILY driver
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -879,12 +917,21 @@ test_family(void)
char dname[] = "dataset";
unsigned int i, j;
int * fhandle = NULL, *fhandle2 = NULL;
- int buf[FAMILY_NUMBER][FAMILY_SIZE];
- hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
+ int ** buf = NULL;
+ int * buf_data = NULL;
+ hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
hsize_t file_size;
TESTING("FAMILY file driver");
+ /* Set up data array */
+ if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data))))
+ TEST_ERROR;
+ for (i = 0; i < FAMILY_NUMBER; i++)
+ buf[i] = buf_data + (i * FAMILY_SIZE);
+
/* Set property list and file name for FAMILY driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -959,7 +1006,7 @@ test_family(void)
for (j = 0; j < FAMILY_SIZE; j++)
buf[i][j] = (int)((i * 10000) + j);
- if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0)
TEST_ERROR;
/* check file handle API */
@@ -1024,8 +1071,11 @@ test_family(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
+ HDfree(buf);
+ HDfree(buf_data);
+
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY
@@ -1037,8 +1087,12 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- return -1;
-}
+
+ HDfree(buf);
+ HDfree(buf_data);
+
+ return FAIL;
+} /* end test_family() */
/*-------------------------------------------------------------------------
* Function: test_family_compat
@@ -1064,7 +1118,7 @@ error:
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_family_compat(void)
{
@@ -1150,15 +1204,14 @@ error:
return -1;
} /* end test_family_compat() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_family_member_fapl
*
* Purpose: Actually use the member fapl input to the member vfd.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Jacob Smith
* 21 May 2019
@@ -1174,88 +1227,86 @@ test_family_member_fapl(void)
hid_t space = H5I_INVALID_HID;
hid_t dset = H5I_INVALID_HID;
char filename[1024];
- char dname[] = "dataset";
- unsigned i = 0;
- unsigned j = 0;
- int buf[FAMILY_NUMBER][FAMILY_SIZE];
- hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
+ char dname[] = "dataset";
+ unsigned i = 0;
+ unsigned j = 0;
+ int ** buf = NULL;
+ int * buf_data = NULL;
+ hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
TESTING("Family member FAPL");
- fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if (H5I_INVALID_HID == fapl_id) {
+ /* Set up data array */
+ if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int))))
TEST_ERROR;
- }
- memb_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if (H5I_INVALID_HID == memb_fapl_id) {
+ if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data))))
TEST_ERROR;
- }
- if (H5Pset_fapl_sec2(memb_fapl_id) == FAIL) {
+ for (i = 0; i < FAMILY_NUMBER; i++)
+ buf[i] = buf_data + (i * FAMILY_SIZE);
+
+ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID)
TEST_ERROR;
- }
- if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_SIZE, memb_fapl_id) == FAIL) {
+
+ if ((memb_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID)
TEST_ERROR;
- }
+
+ if (H5Pset_fapl_sec2(memb_fapl_id) == FAIL)
+ TEST_ERROR;
+ if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_SIZE, memb_fapl_id) == FAIL)
+ TEST_ERROR;
+
h5_fixname(FILENAME[2], fapl_id, filename, sizeof(filename));
- file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
- if (H5I_INVALID_HID == file) {
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) == H5I_INVALID_HID)
TEST_ERROR;
- }
- space = H5Screate_simple(2, dims, NULL);
- if (H5I_INVALID_HID == space) {
+ if ((space = H5Screate_simple(2, dims, NULL)) == H5I_INVALID_HID)
TEST_ERROR;
- }
/* Create and write to dataset, then close file.
*/
- dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (H5I_INVALID_HID == dset) {
+ if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) ==
+ H5I_INVALID_HID)
TEST_ERROR;
- }
+
for (i = 0; i < FAMILY_NUMBER; i++) {
for (j = 0; j < FAMILY_SIZE; j++) {
buf[i][j] = (int)((i * 10000) + j);
}
}
- if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) == FAIL) {
+
+ if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) == FAIL)
TEST_ERROR;
- }
- if (H5Dclose(dset) == FAIL) {
+
+ if (H5Dclose(dset) == FAIL)
TEST_ERROR;
- }
- if (H5Sclose(space) == FAIL) {
+ if (H5Sclose(space) == FAIL)
TEST_ERROR;
- }
- if (H5Fclose(file) == FAIL) {
+ if (H5Fclose(file) == FAIL)
TEST_ERROR;
- }
/* "Close" member FAPL at top level and re-open file.
* Should succeed, with library managing reference count properly
*/
- if (H5Pclose(memb_fapl_id) == FAIL) {
+ if (H5Pclose(memb_fapl_id) == FAIL)
TEST_ERROR;
- }
- file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
- if (H5I_INVALID_HID == file) {
+ if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) == H5I_INVALID_HID)
TEST_ERROR;
- }
- if (H5Fclose(file) == FAIL) {
+ if (H5Fclose(file) == FAIL)
TEST_ERROR;
- }
h5_delete_test_file(FILENAME[2], fapl_id);
- if (H5Pclose(fapl_id) == FAIL) {
+ if (H5Pclose(fapl_id) == FAIL)
TEST_ERROR;
- }
+
+ HDfree(buf);
+ HDfree(buf_data);
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY
@@ -1268,7 +1319,10 @@ error:
}
H5E_END_TRY;
- return -1;
+ HDfree(buf);
+ HDfree(buf_data);
+
+ return FAIL;
} /* end test_family_member_fapl() */
/*-------------------------------------------------------------------------
@@ -1290,7 +1344,7 @@ error:
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format - nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_multi_opens(char *fname)
{
@@ -1310,7 +1364,7 @@ test_multi_opens(char *fname)
return (fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
-H5_GCC_DIAG_ON(format - nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_multi
@@ -1345,10 +1399,19 @@ test_multi(void)
char dname[] = "dataset";
char meta[] = "this is some metadata on this file";
int i, j;
- int buf[MULTI_SIZE][MULTI_SIZE];
+ int ** buf = NULL;
+ int * buf_data = NULL;
TESTING("MULTI file driver");
+ /* Set up data array */
+ if (NULL == (buf_data = (int *)HDcalloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf = (int **)HDcalloc(MULTI_SIZE, sizeof(buf_data))))
+ TEST_ERROR;
+ for (i = 0; i < MULTI_SIZE; i++)
+ buf[i] = buf_data + (i * MULTI_SIZE);
+
/* Set file access property list for MULTI driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -1451,7 +1514,7 @@ test_multi(void)
for (i = 0; i < MULTI_SIZE; i++)
for (j = 0; j < MULTI_SIZE; j++)
buf[i][j] = i * 10000 + j;
- if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0)
TEST_ERROR;
if ((fapl2 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -1529,6 +1592,9 @@ test_multi(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
+ HDfree(buf);
+ HDfree(buf_data);
+
PASSED();
return SUCCEED;
@@ -1544,6 +1610,10 @@ error:
H5Aclose(attr);
}
H5E_END_TRY;
+
+ HDfree(buf);
+ HDfree(buf_data);
+
return FAIL;
} /* end test_multi() */
@@ -1581,10 +1651,19 @@ test_multi_compat(void)
char sv[H5FD_MEM_NTYPES][32];
hsize_t dims[2] = {MULTI_SIZE, MULTI_SIZE};
int i, j;
- int buf[MULTI_SIZE][MULTI_SIZE];
+ int ** buf = NULL;
+ int * buf_data = NULL;
TESTING("MULTI file driver backward compatibility");
+ /* Set up data array */
+ if (NULL == (buf_data = (int *)HDcalloc(MULTI_SIZE * MULTI_SIZE, sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (buf = (int **)HDcalloc(MULTI_SIZE, sizeof(buf_data))))
+ TEST_ERROR;
+ for (i = 0; i < MULTI_SIZE; i++)
+ buf[i] = buf_data + (i * MULTI_SIZE);
+
/* Set file access property list for MULTI driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -1669,7 +1748,7 @@ test_multi_compat(void)
for (i = 0; i < MULTI_SIZE; i++)
for (j = 0; j < MULTI_SIZE; j++)
buf[i][j] = i * 10000 + j;
- if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0)
TEST_ERROR;
if (H5Dclose(dset) < 0)
@@ -1707,9 +1786,12 @@ test_multi_compat(void)
if (H5Pclose(fapl) < 0)
TEST_ERROR;
+ HDfree(buf);
+ HDfree(buf_data);
+
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY
@@ -1720,8 +1802,12 @@ error:
H5Fclose(file);
}
H5E_END_TRY;
- return -1;
-}
+
+ HDfree(buf);
+ HDfree(buf_data);
+
+ return FAIL;
+} /* end test_multi_compat() */
/*-------------------------------------------------------------------------
* Function: test_log
@@ -1749,12 +1835,23 @@ test_log(void)
hsize_t file_size = 0;
unsigned int flags = H5FD_LOG_ALL;
size_t buf_size = 4 * KB;
+ herr_t ret = SUCCEED;
TESTING("LOG file driver");
- /* Set property list and file name for log driver. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
+
+ /* Make sure calling with an invalid fapl doesn't crash */
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_fapl_log(H5I_INVALID_HID, LOG_FILENAME, 0, 0);
+ }
+ H5E_END_TRY;
+ if (SUCCEED == ret)
+ TEST_ERROR;
+
+ /* Set property list and file name for log driver. */
if (H5Pset_fapl_log(fapl, LOG_FILENAME, flags, buf_size) < 0)
TEST_ERROR;
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
@@ -2094,14 +2191,12 @@ static herr_t
test_ros3(void)
{
#ifdef H5_HAVE_ROS3_VFD
- hid_t fid = -1; /* file ID */
- hid_t fapl_id = -1; /* file access property list ID */
- hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
- hid_t driver_id = -1; /* ID for this VFD */
- unsigned long driver_flags = 0; /* VFD feature flags */
- char filename[1024]; /* filename */
- void * os_file_handle = NULL; /* OS file handle */
- hsize_t file_size; /* file size */
+ hid_t fid = -1; /* file ID */
+ hid_t fapl_id = -1; /* file access property list ID */
+ hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ char filename[1024]; /* filename */
H5FD_ros3_fapl_t test_ros3_fa;
H5FD_ros3_fapl_t ros3_fa_0 = {
/* version = */ H5FD_CURR_ROS3_FAPL_T_VERSION,
@@ -2133,9 +2228,9 @@ test_ros3(void)
/* need a macro to compare instances of H5FD_ros3_fapl_t */
if ((test_ros3_fa.version != ros3_fa_0.version) ||
(test_ros3_fa.authenticate != ros3_fa_0.authenticate) ||
- (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
- (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
- (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
+ (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
+ (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
+ (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
TEST_ERROR;
h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename));
@@ -2169,16 +2264,1114 @@ error:
#endif /* H5_HAVE_ROS3_VFD */
} /* end test_ros3() */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Macro: SPLITTER_TEST_FAULT()
+ *
+ * utility macro, helps create stack-like backtrace on error.
+ * requires defined in the calling function:
+ * * variable `int ret_value` (return -1 on error)`
+ * * label `done` for exit on fault
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+#define SPLITTER_TEST_FAULT(mesg) \
+ { \
+ H5_FAILED(); \
+ AT(); \
+ HDfprintf(stderr, mesg); \
+ H5Eprint2(H5E_DEFAULT, stderr); \
+ HDfflush(stderr); \
+ ret_value = -1; \
+ goto done; \
+ }
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: compare_splitter_config_info
*
- * Purpose: Tests the basic features of Virtual File Drivers
+ * Purpose: Helper function to compare configuration info found in a
+ * FAPL against a canonical structure.
+ *
+ * Return: Success: 0, if config info in FAPL matches info structure.
+ * Failure: -1, if difference detected.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
+{
+ int ret_value = 0;
+ H5FD_splitter_vfd_config_t *fetched_info = NULL;
+
+ if (NULL == (fetched_info = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for fetched_info struct failed");
+
+ fetched_info->magic = H5FD_SPLITTER_MAGIC;
+ fetched_info->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ fetched_info->rw_fapl_id = H5I_INVALID_HID;
+ fetched_info->wo_fapl_id = H5I_INVALID_HID;
+
+ if (H5Pget_fapl_splitter(fapl_id, fetched_info) < 0) {
+ SPLITTER_TEST_FAULT("can't get splitter info");
+ }
+ if (info->rw_fapl_id == H5P_DEFAULT) {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ SPLITTER_TEST_FAULT("Read-Write driver mismatch (default)\n");
+ }
+ }
+ else {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(info->rw_fapl_id)) {
+ SPLITTER_TEST_FAULT("Read-Write driver mismatch\n");
+ }
+ }
+ if (info->wo_fapl_id == H5P_DEFAULT) {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ SPLITTER_TEST_FAULT("Write-Only driver mismatch (default)\n");
+ }
+ }
+ else {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(info->wo_fapl_id)) {
+ SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
+ }
+ }
+ if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
+ HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
+ HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
+ HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
+ HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
+ SPLITTER_TEST_FAULT("Write-Only file path mismatch\n");
+ }
+
+done:
+ HDfree(fetched_info);
+
+ return ret_value;
+} /* end compare_splitter_config_info() */
+
+/*-------------------------------------------------------------------------
+ * Function: run_splitter_test
+ *
+ * Purpose: Auxiliary function for test_splitter().
*
* Return: Success: 0
- * Failure: 1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * Tuesday, Sept 24, 2002
+ * Description:
+ * Perform basic open-write-close with the Splitter VFD.
+ * Prior to operations, removes files from a previous run,
+ * if they exist.
+ * After writing, compares read-write and write-only files.
+ * Includes FAPL sanity testing.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_errors,
+ hbool_t provide_logfile_path, const hid_t sub_fapl_ids[2])
+{
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t fapl_id_out = H5I_INVALID_HID;
+ hid_t fapl_id_cpy = H5I_INVALID_HID;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ char * filename_rw = NULL;
+ FILE * logfile = NULL;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = ignore_wo_errors;
+ vfd_config->rw_fapl_id = sub_fapl_ids[0];
+ vfd_config->wo_fapl_id = sub_fapl_ids[1];
+
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
+ SPLITTER_TEST_FAULT("can't prepare file paths\n");
+ }
+
+ if (provide_logfile_path == FALSE) {
+ vfd_config->log_file_path[0] = '\0'; /* reset as empty string */
+ }
+
+ /* Create a new fapl to use the SPLITTER file driver */
+ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("can't create FAPL ID\n");
+ }
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
+ }
+ if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
+ SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n");
+ }
+
+ if (compare_splitter_config_info(fapl_id, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("information mismatch\n");
+ }
+
+ /*
+ * Copy property list, light compare, and close the copy.
+ * Helps test driver-implemented FAPL-copying and library ID management.
+ */
+
+ fapl_id_cpy = H5Pcopy(fapl_id);
+ if (H5I_INVALID_HID == fapl_id_cpy) {
+ SPLITTER_TEST_FAULT("can't copy FAPL\n");
+ }
+ if (compare_splitter_config_info(fapl_id_cpy, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("information mismatch\n");
+ }
+ if (H5Pclose(fapl_id_cpy) < 0) {
+ SPLITTER_TEST_FAULT("can't close fapl copy\n");
+ }
+
+ /*
+ * Proceed with test. Create file.
+ */
+ file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (file_id < 0) {
+ SPLITTER_TEST_FAULT("can't create file\n");
+ }
+
+ /*
+ * Check driver from file
+ */
+
+ fapl_id_out = H5Fget_access_plist(file_id);
+ if (H5I_INVALID_HID == fapl_id_out) {
+ SPLITTER_TEST_FAULT("can't get file's FAPL\n");
+ }
+ if (H5Pget_driver(fapl_id_out) != H5FD_SPLITTER) {
+ SPLITTER_TEST_FAULT("wrong file FAPL driver\n");
+ }
+ if (compare_splitter_config_info(fapl_id_out, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("information mismatch\n");
+ }
+ if (H5Pclose(fapl_id_out) < 0) {
+ SPLITTER_TEST_FAULT("can't close file's FAPL\n");
+ }
+
+ /*
+ * Create and write the dataset
+ */
+
+ space_id = H5Screate_simple(data->n_dims, data->dims, NULL);
+ if (space_id < 0) {
+ SPLITTER_TEST_FAULT("can't create dataspace\n");
+ }
+ dset_id = H5Dcreate2(file_id, data->dset_name, data->mem_type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT);
+ if (dset_id < 0) {
+ SPLITTER_TEST_FAULT("can't create dataset\n");
+ }
+ if (H5Dwrite(dset_id, data->mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, data->buf) < 0) {
+ SPLITTER_TEST_FAULT("can't write data to dataset\n");
+ }
+
+ /* Close everything */
+ if (H5Dclose(dset_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close dset\n");
+ }
+ if (H5Sclose(space_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close space\n");
+ }
+ if (H5Pclose(fapl_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close fapl\n");
+ }
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file\n");
+ }
+
+ /* Verify that the R/W and W/O files are identical */
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
+ }
+
+ /* Verify existence of logfile if appropriate */
+ logfile = HDfopen(vfd_config->log_file_path, "r");
+ if ((TRUE == provide_logfile_path && NULL == logfile) ||
+ (FALSE == provide_logfile_path && NULL != logfile)) {
+ SPLITTER_TEST_FAULT("no logfile when one was expected\n");
+ }
+
+done:
+ if (ret_value < 0) {
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Pclose(fapl_id_out);
+ H5Pclose(fapl_id_cpy);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+ }
+
+ if (logfile != NULL)
+ HDfclose(logfile);
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
+ return ret_value;
+} /* end run_splitter_test() */
+
+/*-------------------------------------------------------------------------
+ * Function: driver_is_splitter_compatible
+ *
+ * Purpose: Determine whether the driver set in the FAPL ID is compatible
+ * with the Splitter VFD -- specificially, Write-Only channel.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description: Attempts to put the given FAPL ID as the W/O channel.
+ * Uses driver's own mechanisms to generate error, and catches
+ * error.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+driver_is_splitter_compatible(hid_t fapl_id)
+{
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t split_fapl_id = H5I_INVALID_HID;
+ herr_t ret = SUCCEED;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
+ FAIL_PUTS_ERROR("memory allocation for vfd_config struct failed");
+ }
+
+ if (H5I_INVALID_HID == (split_fapl_id = H5Pcreate(H5P_FILE_ACCESS))) {
+ FAIL_PUTS_ERROR("Can't create contained FAPL");
+ }
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = H5P_DEFAULT;
+ vfd_config->wo_fapl_id = fapl_id;
+ HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ vfd_config->log_file_path[0] = '\0';
+
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_fapl_splitter(split_fapl_id, vfd_config);
+ }
+ H5E_END_TRY;
+ if (SUCCEED == ret) {
+ ret_value = -1;
+ }
+
+ if (H5Pclose(split_fapl_id) < 0) {
+ FAIL_PUTS_ERROR("Can't close contained FAPL")
+ }
+ split_fapl_id = H5I_INVALID_HID;
+
+ HDfree(vfd_config);
+
+ return ret_value;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(split_fapl_id);
+ }
+ H5E_END_TRY;
+
+ HDfree(vfd_config);
+
+ return -1;
+} /* end driver_is_splitter_compatible() */
+
+/*-------------------------------------------------------------------------
+ * Function: splitter_RO_test
+ *
+ * Purpose: Verify Splitter VFD with the Read-Only access flag.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description: Attempt read-only opening of files with different
+ * permutations of files already existing on-disk.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+splitter_RO_test(const struct splitter_dataset_def *data, hid_t child_fapl_id)
+{
+ char * filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
+
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
+ SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
+ }
+
+ /* Create a new fapl to use the SPLITTER file driver */
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ if (H5I_INVALID_HID == fapl_id) {
+ SPLITTER_TEST_FAULT("can't create FAPL ID\n");
+ }
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
+ }
+ if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
+ SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n");
+ }
+
+ /* Attempt R/O open when both files are nonexistent
+ * Should fail.
+ */
+
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id >= 0) {
+ SPLITTER_TEST_FAULT("R/O open on nonexistent files unexpectedly successful\n");
+ }
+
+ /* Attempt R/O open when only W/O file exists
+ * Should fail.
+ */
+
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
+ SPLITTER_TEST_FAULT("can't write W/O file\n");
+ }
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id >= 0) {
+ SPLITTER_TEST_FAULT("R/O open with extant W/O file unexpectedly successful\n");
+ }
+ HDremove(vfd_config->wo_path);
+
+ /* Attempt R/O open when only R/W file exists
+ * Should fail.
+ */
+
+ if (splitter_create_single_file_at(filename_rw, vfd_config->rw_fapl_id, data) < 0) {
+ SPLITTER_TEST_FAULT("can't create R/W file\n");
+ }
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id >= 0) {
+ SPLITTER_TEST_FAULT("R/O open with extant R/W file unexpectedly successful\n");
+ }
+
+ /* Attempt R/O open when both R/W and W/O files exist
+ */
+
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
+ SPLITTER_TEST_FAULT("can't create W/O file\n");
+ }
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
+ if (file_id < 0) {
+ SPLITTER_TEST_FAULT("R/O open on two extant files failed\n");
+ }
+ if (splitter_compare_expected_data(file_id, data) < 0) {
+ SPLITTER_TEST_FAULT("data mismatch in R/W file\n");
+ }
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file(s)\n");
+ }
+ file_id = H5I_INVALID_HID;
+
+ /* Cleanup
+ */
+
+ if (H5Pclose(fapl_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close FAPL ID\n");
+ }
+ fapl_id = H5I_INVALID_HID;
+
+done:
+ if (ret_value < 0) {
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
+ return ret_value;
+} /* end splitter_RO_test() */
+
+/*-------------------------------------------------------------------------
+ * Function: splitter_prepare_file_paths
+ *
+ * Purpose: Get file paths ready for use by the Splitter VFD tests.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description:
+ * Use h5_fixname to adjust the splitter-relevant file paths
+ * from those given in FILENAMES.
+ *
+ * REMOVES EXISTING FILES AT THE PATH LOCATIONS PRIOR TO RETURN.
+ *
+ * The relevant file paths will be set in filename_rw_out and
+ * inside the config structure (wo_path, log_file_path).
+ *
+ * `filename_rw_out` must be at least H5FD_SPLITTER_PATH_MAX+1
+ * characters long.
+ *
+ * `vfd_config` must have its child FAPL IDs preset.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+splitter_prepare_file_paths(H5FD_splitter_vfd_config_t *vfd_config, char *filename_rw_out)
+{
+ int ret_value = 0;
+
+ if (vfd_config == NULL || vfd_config->magic != H5FD_SPLITTER_MAGIC) {
+ SPLITTER_TEST_FAULT("invalid splitter config pointer\n");
+ }
+ if (filename_rw_out == NULL) {
+ SPLITTER_TEST_FAULT("NULL filename_rw pointer\n");
+ }
+
+ /* TODO: sanity-check fapl IDs? */
+
+ /* Build the r/w file, w/o file, and the log file paths.
+ * Output is stored in the associated string pointers.
+ */
+ h5_fixname(FILENAME[11], vfd_config->rw_fapl_id, filename_rw_out, H5FD_SPLITTER_PATH_MAX);
+ h5_fixname(FILENAME[12], vfd_config->wo_fapl_id, vfd_config->wo_path, H5FD_SPLITTER_PATH_MAX);
+ h5_fixname_no_suffix(FILENAME[13], vfd_config->wo_fapl_id, vfd_config->log_file_path,
+ H5FD_SPLITTER_PATH_MAX);
+
+ /* Delete any existing files on disk.
+ */
+ HDremove(filename_rw_out);
+ HDremove(vfd_config->wo_path);
+ HDremove(vfd_config->log_file_path);
+
+done:
+ return ret_value;
+} /* end splitter_prepare_file_paths() */
+
+/*-------------------------------------------------------------------------
+ * Function: splitter_crate_single_file_at
+ *
+ * Purpose: Create a file, optionally w/ dataset.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description:
+ * Create a file at the given location with the given FAPL,
+ * and write data as defined in `data` in a pre-determined location in the file.
+ *
+ * If the dataset definition pointer is NULL, no data is written
+ * to the file.
+ *
+ * Will always overwrite an existing file with the given name/path.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+splitter_create_single_file_at(const char *filename, hid_t fapl_id, const struct splitter_dataset_def *data)
+{
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ int ret_value = 0;
+
+ if (filename == NULL || *filename == '\0') {
+ SPLITTER_TEST_FAULT("filename is invalid\n");
+ }
+ /* TODO: sanity-check fapl id? */
+
+ file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (file_id < 0) {
+ SPLITTER_TEST_FAULT("can't create file\n");
+ }
+
+ if (data) {
+ /* TODO: sanity-check data, if it exists? */
+ space_id = H5Screate_simple(data->n_dims, data->dims, NULL);
+ if (space_id < 0) {
+ SPLITTER_TEST_FAULT("can't create dataspace\n");
+ }
+
+ dset_id = H5Dcreate2(file_id, data->dset_name, data->mem_type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT);
+ if (dset_id < 0) {
+ SPLITTER_TEST_FAULT("can't create dataset\n");
+ }
+
+ if (H5Dwrite(dset_id, data->mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, data->buf) < 0) {
+ SPLITTER_TEST_FAULT("can't write data to dataset\n");
+ }
+
+ if (H5Dclose(dset_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close dset\n");
+ }
+ if (H5Sclose(space_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close space\n");
+ }
+ } /* end if data definition is provided */
+
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file\n");
+ }
+
+done:
+ if (ret_value < 0) {
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+ } /* end if error */
+ return ret_value;
+} /* end splitter_create_single_file_at() */
+
+/*-------------------------------------------------------------------------
+ * Function: splitter_compare_expected_data
+ *
+ * Purpose: Compare data within a predermined dataset.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description: Read data from the file at a predetermined location, and
+ * compare its contents byte-for-byte with that expected in
+ * the `data` definition structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+splitter_compare_expected_data(hid_t file_id, const struct splitter_dataset_def *data)
+{
+ hid_t dset_id = H5I_INVALID_HID;
+ int buf[SPLITTER_SIZE][SPLITTER_SIZE];
+ int expected[SPLITTER_SIZE][SPLITTER_SIZE];
+ size_t i = 0;
+ size_t j = 0;
+ int ret_value = 0;
+
+ if (sizeof((void *)buf) != sizeof(data->buf)) {
+ SPLITTER_TEST_FAULT("invariant size of expected data does not match that received!\n");
+ }
+ HDmemcpy(expected, data->buf, sizeof(expected));
+
+ dset_id = H5Dopen2(file_id, data->dset_name, H5P_DEFAULT);
+ if (dset_id < 0) {
+ SPLITTER_TEST_FAULT("can't open dataset\n");
+ }
+
+ if (H5Dread(dset_id, data->mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)buf) < 0) {
+ SPLITTER_TEST_FAULT("can't read dataset\n");
+ }
+
+ for (i = 0; i < SPLITTER_SIZE; i++) {
+ for (j = 0; j < SPLITTER_SIZE; j++) {
+ if (buf[i][j] != expected[i][j]) {
+ SPLITTER_TEST_FAULT("mismatch in expected data\n");
+ }
+ }
+ }
+
+ if (H5Dclose(dset_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close dataset\n");
+ }
+
+done:
+ if (ret_value < 0) {
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(dset_id);
+ }
+ H5E_END_TRY;
+ }
+ return ret_value;
+} /* end splitter_compare_expected_data() */
+
+/*-------------------------------------------------------------------------
+ * Function: splitter_tentative_open_test()
+ *
+ * Purpose: Verifies Splitter behavior with "tentative" H5F_open.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description:
+ * H5F_open() has a two-stage opening process when given a
+ * Read/Write access flag -- first it performs a "tentative
+ * open", where it checks to see whether files already exist
+ * on the system, done in such a way as to not "alter its state"
+ * (i.e., truncate).
+ * This can cause problems with the Splitter VFD, as the
+ * file on the R/W channel might exist already, but that on the
+ * W/O channel will not, and vice-versa.
+ *
+ * This test exists to verify that in any event, files will be
+ * created as required.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+splitter_tentative_open_test(hid_t child_fapl_id)
+{
+ const char * filename_tmp = "splitter_tmp.h5";
+ char * filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ int buf[SPLITTER_SIZE][SPLITTER_SIZE]; /* for comparison */
+ hsize_t dims[2] = {SPLITTER_SIZE, SPLITTER_SIZE}; /* for comparison */
+ int i = 0; /* for comparison */
+ int j = 0; /* for comparison */
+ struct splitter_dataset_def data; /* for comparison */
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ /* pre-fill data buffer to write */
+ for (i = 0; i < SPLITTER_SIZE; i++) {
+ for (j = 0; j < SPLITTER_SIZE; j++) {
+ buf[i][j] = i * 100 + j;
+ }
+ }
+
+ /* Dataset info */
+ data.buf = (void *)buf;
+ data.mem_type_id = H5T_NATIVE_INT;
+ data.dims = dims;
+ data.n_dims = 2;
+ data.dset_name = SPLITTER_DATASET_NAME;
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
+
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
+ SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
+ }
+
+ /* Create a new fapl to use the SPLITTER file driver */
+ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("can't create FAPL ID\n");
+ }
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
+ SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
+ }
+ if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
+ SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n");
+ }
+
+ /* Create instance of file on disk.
+ * Will be copied verbatim as needed, to avoid issues where differences in
+ * the creation time would befoul comparisons.
+ */
+ if (splitter_create_single_file_at(filename_tmp, child_fapl_id, &data) < 0) {
+ SPLITTER_TEST_FAULT("can't write W/O file\n");
+ }
+
+ /*
+ * H5Fopen() with RDWR access.
+ * Neither file exist already
+ * Should fail.
+ */
+
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id != H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("open with both nonexistent files unexpectedly succeeded\n");
+ }
+ if (file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
+ }
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
+ }
+
+ /*
+ * H5Fopen() with RDWR access.
+ * Only W/O file present.
+ * Should fail.
+ */
+
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
+ }
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id != H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("open with nonexistent R/W file unexpectedly succeeded\n");
+ }
+ if (file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
+ }
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
+ }
+ HDremove(vfd_config->wo_path);
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("failed to remove W/O file\n");
+ }
+
+ /*
+ * H5Fopen() with RDWR access.
+ * Only R/W file present.
+ * Should fail.
+ */
+
+ if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) {
+ SPLITTER_TEST_FAULT("Can't create R/W file copy.\n");
+ }
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id != H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("open with nonexistent W/O unexpectedly succeeded\n");
+ }
+ if (!file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file mysteriously disappeared\n");
+ }
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
+ }
+
+ /*
+ * H5Fopen() with RDWR access.
+ * Both files present.
+ */
+
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
+ }
+ file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
+ if (file_id == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("file-open failed with both present\n");
+ }
+ /* Open successful; close file then inspect presence again */
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file ID\n");
+ }
+ if (!file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
+ }
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
+ }
+
+ /*
+ * H5Fcreate() with TRUNC access.
+ * Both files present.
+ */
+
+ file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (file_id == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("file-open failed with both present\n");
+ }
+ /* Open successful; close file then inspect presence again */
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file ID\n");
+ }
+ if (!file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
+ }
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
+ }
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
+ }
+ HDremove(filename_rw);
+ HDremove(vfd_config->wo_path);
+
+ /*
+ * H5Fcreate() with TRUNC access.
+ * R/W already exists.
+ */
+
+ if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) {
+ SPLITTER_TEST_FAULT("Can't create R/W file copy.\n");
+ }
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("failed to remove W/O file\n");
+ }
+ file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (file_id == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("file-open failed with both present\n");
+ }
+ /* Open successful; close file then inspect presence again */
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file ID\n");
+ }
+ if (!file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
+ }
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
+ }
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
+ }
+ HDremove(filename_rw);
+ HDremove(vfd_config->wo_path);
+
+ /*
+ * H5Fcreate() with TRUNC access.
+ * Only W/O present.
+ */
+
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
+ }
+ if (file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("failed to remove R/W file\n");
+ }
+ file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ if (file_id == H5I_INVALID_HID) {
+ SPLITTER_TEST_FAULT("file-open failed with both present\n");
+ }
+ /* Open successful; close file then inspect presence again */
+ if (H5Fclose(file_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close file ID\n");
+ }
+ if (!file_exists(filename_rw, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
+ }
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
+ SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
+ }
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
+ SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
+ }
+ HDremove(filename_rw);
+ HDremove(vfd_config->wo_path);
+
+ /* H5Fcreate with both files absent is tested elsewhere */
+
+ /*
+ * Cleanup
+ */
+
+ if (H5Pclose(fapl_id) < 0) {
+ SPLITTER_TEST_FAULT("can't close splitter FAPL ID\n");
+ }
+
+done:
+ if (ret_value < 0) {
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
+ return ret_value;
+} /* end splitter_tentative_open_test() */
+
+/*-------------------------------------------------------------------------
+ * Function: file_exists()
+ *
+ * Purpose: Determine whether a file exists on-system
+ *
+ * Return: Non-zero (1) if it exists (H5Fopen successful),
+ * zero (0) if absent (cannot be opened).
+ *
+ * Description: Attempt H5Fopen with the given FAPL ID and RDONLY access flag.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+file_exists(const char *filename, hid_t fapl_id)
+{
+ hid_t file_id = H5I_INVALID_HID;
+ int ret_value = 0;
+
+ H5E_BEGIN_TRY
+ {
+ file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id);
+ }
+ H5E_END_TRY;
+ if (file_id != H5I_INVALID_HID) {
+ ret_value = 1;
+ if (H5Fclose(file_id) < 0) {
+ FAIL_PUTS_ERROR("can't close file ID\n");
+ }
+ }
+
+ return ret_value;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(file_id);
+ }
+ H5E_END_TRY;
+ return ret_value;
+} /* end file_exists() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_splitter
+ *
+ * Purpose: Tests the Splitter VFD
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Description:
+ * This test function uses the Splitter VFD to produce a r/w
+ * file and a w/o file. It will verify that the two files
+ * are identical.
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_splitter(void)
+{
+ int buf[SPLITTER_SIZE][SPLITTER_SIZE];
+ hsize_t dims[2] = {SPLITTER_SIZE, SPLITTER_SIZE};
+ hid_t child_fapl_id = H5I_INVALID_HID;
+ int i = 0;
+ int j = 0;
+ struct splitter_dataset_def data;
+
+ TESTING("SPLITTER file driver");
+
+ /* pre-fill data buffer to write */
+ for (i = 0; i < SPLITTER_SIZE; i++) {
+ for (j = 0; j < SPLITTER_SIZE; j++) {
+ buf[i][j] = i * 100 + j;
+ }
+ }
+
+ /* Dataset info */
+ data.buf = (void *)buf;
+ data.mem_type_id = H5T_NATIVE_INT;
+ data.dims = dims;
+ data.n_dims = 2;
+ data.dset_name = SPLITTER_DATASET_NAME;
+
+ /* Stand-in for manual FAPL creation
+ * Enables verification with arbitrary VFDs via `make check-vfd`
+ */
+ child_fapl_id = h5_fileaccess();
+ if (child_fapl_id < 0) {
+ TEST_ERROR;
+ }
+
+ if (!driver_is_splitter_compatible(child_fapl_id)) {
+ SKIPPED();
+ HDprintf(" given driver is not Splitter W/O compatible.\n");
+ return 0;
+ }
+
+ /* Test Read-Only access, including when a file on the W/O channel
+ * does not exist.
+ */
+ if (splitter_RO_test(&data, child_fapl_id) < 0) {
+ TEST_ERROR;
+ }
+
+ /* Test opening of files when the W/O channel does not exist.
+ */
+ if (splitter_tentative_open_test(child_fapl_id) < 0) {
+ TEST_ERROR;
+ }
+
+ /* Test file creation, utilizing different child FAPLs (default vs.
+ * specified), logfile, and Write Channel error ignoring behavior.
+ */
+ for (i = 0; i < 4; i++) {
+ hbool_t ignore_wo_errors = (i & 1) ? TRUE : FALSE;
+ hbool_t provide_logfile_path = (i & 2) ? TRUE : FALSE;
+ hid_t child_fapl_ids[2] = {H5P_DEFAULT, H5P_DEFAULT};
+
+ /* Test child driver definition/default combination */
+ for (j = 0; j < 4; j++) {
+
+ child_fapl_ids[0] = (j & 1) ? child_fapl_id : H5P_DEFAULT;
+ child_fapl_ids[1] = (j & 2) ? child_fapl_id : H5P_DEFAULT;
+
+ if (run_splitter_test(&data, ignore_wo_errors, provide_logfile_path, child_fapl_ids) < 0) {
+ TEST_ERROR;
+ }
+
+ } /* end for child fapl definition/pairing */
+
+ } /* end for behavior-flag loops */
+
+ /* TODO: SWMR open? */
+ /* Concurrent opens with both drivers using the Splitter */
+
+ if (H5Pclose(child_fapl_id) == FAIL) {
+ TEST_ERROR;
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ if (child_fapl_id != H5I_INVALID_HID)
+ H5Pclose(child_fapl_id);
+
+ return -1;
+} /* end test_splitter() */
+
+#undef SPLITTER_TEST_FAULT
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the basic features of Virtual File Drivers
+ *
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
@@ -2203,13 +3396,14 @@ main(void)
nerrors += test_stdio() < 0 ? 1 : 0;
nerrors += test_windows() < 0 ? 1 : 0;
nerrors += test_ros3() < 0 ? 1 : 0;
+ nerrors += test_splitter() < 0 ? 1 : 0;
if (nerrors) {
HDprintf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
- return 1;
- } /* end if */
+ return EXIT_FAILURE;
+ }
HDprintf("All Virtual File Driver tests passed.\n");
- return 0;
+ return EXIT_SUCCESS;
} /* end main() */
diff --git a/test/vol.c b/test/vol.c
index 6abdccb..6b17765 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -18,6 +18,7 @@
* other mechanisms.
*/
+/* Headers needed */
#include "h5test.h"
/* Filename */
@@ -41,7 +42,7 @@ const char *FILENAME[] = {"native_vol_test", NULL};
* functionality.
*/
static const H5VL_class_t fake_vol_g = {
- 0, /* version */
+ H5VL_VERSION, /* VOL class struct version */
FAKE_VOL_VALUE, /* value */
FAKE_VOL_NAME, /* name */
0, /* capability flags */
@@ -90,7 +91,7 @@ static const H5VL_class_t fake_vol_g = {
/* datatype_cls */
NULL, /* commit */
NULL, /* open */
- NULL, /* get_size */
+ NULL, /* get */
NULL, /* specific */
NULL, /* optional */
NULL /* close */
@@ -173,13 +174,14 @@ static const H5VL_class_t fake_vol_g = {
static herr_t
test_vol_registration(void)
{
- hid_t native_id = H5I_INVALID_HID;
- hid_t lapl_id = H5I_INVALID_HID;
- hid_t vipl_id = H5I_INVALID_HID;
- herr_t ret = SUCCEED;
- htri_t is_registered = FAIL;
- hid_t vol_id = H5I_INVALID_HID;
- hid_t vol_id2 = H5I_INVALID_HID;
+ hid_t native_id = H5I_INVALID_HID;
+ hid_t lapl_id = H5I_INVALID_HID;
+ hid_t vipl_id = H5I_INVALID_HID;
+ herr_t ret = SUCCEED;
+ htri_t is_registered = FAIL;
+ hid_t vol_id = H5I_INVALID_HID;
+ hid_t vol_id2 = H5I_INVALID_HID;
+ H5VL_class_t *bad_fake_vol_class = NULL;
TESTING("VOL registration");
@@ -206,6 +208,21 @@ test_vol_registration(void)
if (H5Pclose(lapl_id) < 0)
TEST_ERROR;
+ /* Test registering a VOL connector with an incompatible version # */
+ if (NULL == (bad_fake_vol_class = HDmalloc(sizeof(H5VL_class_t))))
+ TEST_ERROR;
+ HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t));
+ bad_fake_vol_class->version = H5VL_VERSION + 1;
+ H5E_BEGIN_TRY
+ {
+ vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
+ if (H5I_INVALID_HID != vol_id)
+ FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #");
+ HDfree(bad_fake_vol_class);
+ bad_fake_vol_class = NULL;
+
/* Load a VOL interface
* The vipl_id does nothing without a VOL that needs it, but we do need to
* test creating a property list of that class and passing it along as a
@@ -282,8 +299,11 @@ error:
H5Pclose(vipl_id);
}
H5E_END_TRY;
- return FAIL;
+ if (bad_fake_vol_class)
+ HDfree(bad_fake_vol_class);
+
+ return FAIL;
} /* end test_vol_registration() */
/*-------------------------------------------------------------------------
@@ -387,8 +407,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"))) {
+ if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
@@ -409,8 +429,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't retrieve VFD handle for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"))) {
+ if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_vfd_handle */
if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
TEST_ERROR;
@@ -449,8 +469,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"))) {
+ if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
@@ -464,8 +484,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for split / multi / family VFDs */
- if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"))) {
+ if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid_reopen)) < 0)
TEST_ERROR;
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index a4052ce..7656870 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -5,7 +5,7 @@
* 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. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */