summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
commit628d267162895adef5a73e1cd5810030cc98335a (patch)
tree05471ae798eaef041ea98fecdd285c9380ce381a
parentd46ea2d08af456f1cfaf6c6fd3060f39b92be8de (diff)
parent7e93acd94f20c73d27bb2eb4f7b4389d88cfb299 (diff)
downloadhdf5-628d267162895adef5a73e1cd5810030cc98335a.zip
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.gz
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.bz2
merge and fix conflict
-rw-r--r--CMakeLists.txt48
-rw-r--r--MANIFEST1
-rwxr-xr-xbin/trace1
-rw-r--r--c++/examples/CMakeLists.txt2
-rw-r--r--c++/test/CMakeLists.txt4
-rw-r--r--config/cmake_ext_mod/CTestCustom.cmake16
-rw-r--r--config/cmake_ext_mod/runTest.cmake2
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/CMakeTests.cmake60
-rw-r--r--fortran/examples/CMakeLists.txt2
-rw-r--r--fortran/examples/CMakeTests.cmake138
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--fortran/testpar/CMakeLists.txt4
-rw-r--r--hl/CMakeLists.txt2
-rw-r--r--hl/c++/examples/CMakeLists.txt2
-rw-r--r--hl/c++/test/CMakeLists.txt4
-rw-r--r--hl/examples/CMakeLists.txt4
-rw-r--r--hl/fortran/examples/CMakeLists.txt2
-rw-r--r--hl/fortran/test/CMakeLists.txt4
-rw-r--r--hl/test/CMakeLists.txt4
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt6
-rw-r--r--hl/tools/h5watch/CMakeLists.txt6
-rw-r--r--java/examples/datasets/CMakeLists.txt2
-rw-r--r--java/examples/datatypes/CMakeLists.txt2
-rw-r--r--java/examples/groups/CMakeLists.txt2
-rw-r--r--java/examples/intro/CMakeLists.txt2
-rw-r--r--java/test/CMakeLists.txt72
-rw-r--r--release_docs/RELEASE.txt14
-rw-r--r--src/H5ACmpio.c2
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5B2dbg.c6
-rw-r--r--src/H5B2internal.c4
-rw-r--r--src/H5B2leaf.c4
-rw-r--r--src/H5Clog_json.c2
-rw-r--r--src/H5Dbtree.c4
-rw-r--r--src/H5Dint.c7
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5EAcache.c4
-rw-r--r--src/H5EAtest.c2
-rw-r--r--src/H5FAcache.c6
-rw-r--r--src/H5FS.c3
-rw-r--r--src/H5FScache.c20
-rw-r--r--src/H5FSprivate.h2
-rw-r--r--src/H5Fsuper_cache.c10
-rw-r--r--src/H5Gnode.c2
-rw-r--r--src/H5HFcache.c16
-rw-r--r--src/H5HFsection.c12
-rw-r--r--src/H5HFspace.c2
-rw-r--r--src/H5HGcache.c4
-rw-r--r--src/H5HLcache.c10
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5Oainfo.c6
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5Ocache.c6
-rw-r--r--src/H5Ocopy_ref.c3
-rw-r--r--src/H5Omessage.c2
-rw-r--r--src/H5Oshared.c4
-rw-r--r--src/H5Oshared.h2
-rw-r--r--src/H5Pfapl.c2
-rw-r--r--src/H5Pint.c8
-rw-r--r--src/H5Plapl.c2
-rw-r--r--src/H5R.c6
-rw-r--r--src/H5Rint.c39
-rw-r--r--src/H5Rpkg.h4
-rw-r--r--src/H5SL.c2
-rw-r--r--src/H5SMcache.c8
-rw-r--r--src/H5Tconv.c2
-rw-r--r--src/H5Tref.c7
-rw-r--r--src/H5private.h30
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/CMakeVFDTests.cmake2
-rw-r--r--test/cache_common.c22
-rw-r--r--test/cache_tagging.c3
-rw-r--r--test/dsets.c2
-rw-r--r--test/dtypes.c2
-rw-r--r--test/mf.c7
-rw-r--r--test/page_buffer.c20
-rw-r--r--test/tfile.c9
-rw-r--r--test/tmisc.c1
-rw-r--r--test/trefer_shutdown.c83
-rw-r--r--test/tselect.c2
-rw-r--r--testpar/CMakeLists.txt4
-rw-r--r--testpar/t_2Gio.c2
-rw-r--r--testpar/t_cache.c4
-rw-r--r--tools/lib/h5diff.c4
-rw-r--r--tools/lib/h5diff_array.c20
-rw-r--r--tools/lib/h5diff_attr.c9
-rw-r--r--tools/lib/h5diff_dset.c12
-rw-r--r--tools/lib/h5tools.c36
-rw-r--r--tools/lib/h5tools_dump.c26
-rw-r--r--tools/lib/h5tools_str.c14
-rw-r--r--tools/lib/h5tools_str.h2
-rw-r--r--tools/lib/h5tools_type.c4
-rw-r--r--tools/lib/h5tools_utils.c2
-rw-r--r--tools/lib/h5trav.c4
-rw-r--r--tools/libtest/CMakeLists.txt4
-rw-r--r--tools/libtest/h5tools_test_utils.c6
-rw-r--r--tools/src/h5copy/h5copy.c4
-rw-r--r--tools/src/h5diff/ph5diff_main.c3
-rw-r--r--tools/src/h5dump/h5dump.c4
-rw-r--r--tools/src/h5dump/h5dump_ddl.c8
-rw-r--r--tools/src/h5dump/h5dump_xml.c27
-rw-r--r--tools/src/h5format_convert/h5format_convert.c6
-rw-r--r--tools/src/h5import/h5import.c12
-rw-r--r--tools/src/h5jam/h5jam.c4
-rw-r--r--tools/src/h5jam/h5unjam.c4
-rw-r--r--tools/src/h5ls/h5ls.c32
-rw-r--r--tools/src/h5repack/h5repack.c32
-rw-r--r--tools/src/h5repack/h5repack_copy.c44
-rw-r--r--tools/src/h5repack/h5repack_refs.c38
-rw-r--r--tools/src/h5repack/h5repack_verify.c32
-rw-r--r--tools/src/h5stat/h5stat.c2
-rw-r--r--tools/src/misc/h5clear.c4
-rw-r--r--tools/test/h5copy/CMakeLists.txt4
-rw-r--r--tools/test/h5copy/h5copygentest.c18
-rw-r--r--tools/test/h5diff/CMakeLists.txt4
-rw-r--r--tools/test/h5diff/CMakeTests.cmake58
-rw-r--r--tools/test/h5diff/h5diffgentest.c394
-rw-r--r--tools/test/h5dump/CMakeLists.txt10
-rw-r--r--tools/test/h5dump/h5dumpgentest.c249
-rw-r--r--tools/test/h5format_convert/CMakeLists.txt4
-rw-r--r--tools/test/h5format_convert/h5fc_chk_idx.c4
-rw-r--r--tools/test/h5format_convert/h5fc_gentest.c52
-rw-r--r--tools/test/h5import/CMakeLists.txt4
-rw-r--r--tools/test/h5jam/CMakeLists.txt4
-rw-r--r--tools/test/h5jam/getub.c2
-rw-r--r--tools/test/h5ls/CMakeLists.txt6
-rw-r--r--tools/test/h5repack/CMakeLists.txt4
-rw-r--r--tools/test/h5repack/h5repacktst.c208
-rw-r--r--tools/test/h5stat/CMakeLists.txt4
-rw-r--r--tools/test/h5stat/h5stat_gentest.c56
-rw-r--r--tools/test/misc/CMakeLists.txt8
-rw-r--r--tools/test/misc/h5clear_gentest.c26
-rw-r--r--tools/test/misc/repart_test.c6
-rw-r--r--tools/test/misc/talign.c10
-rw-r--r--tools/test/misc/vds/UC_1_one_dim_gen.c16
-rw-r--r--tools/test/misc/vds/UC_2_two_dims_gen.c16
-rw-r--r--tools/test/misc/vds/UC_3_gaps_gen.c20
-rw-r--r--tools/test/misc/vds/UC_4_printf_gen.c16
-rw-r--r--tools/test/misc/vds/UC_5_stride_gen.c16
-rw-r--r--tools/test/perform/CMakeLists.txt6
-rw-r--r--tools/test/perform/CMakeTests.cmake305
-rw-r--r--tools/test/perform/chunk.c2
-rw-r--r--tools/test/perform/iopipe.c10
-rw-r--r--tools/test/perform/pio_engine.c36
-rw-r--r--tools/test/perform/sio_engine.c28
-rw-r--r--tools/test/perform/sio_standalone.h6
148 files changed, 1525 insertions, 1330 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63c36b0..1466865 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -435,17 +435,29 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
-option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
-set (H5_ENABLE_STATIC_LIB YES)
-if (ONLY_SHARED_LIBS)
- set (H5_ENABLE_STATIC_LIB NO)
- set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
-endif ()
+option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
+set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
+option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
+
+if (BUILD_STATIC_LIBS)
+ set (H5_ENABLE_STATIC_LIB YES)
+endif ()
if (BUILD_SHARED_LIBS)
set (H5_ENABLE_SHARED_LIB YES)
endif ()
+
+# Force only shared libraries if all OFF
+if (NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+ set (ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE)
+endif ()
+
+if (ONLY_SHARED_LIBS)
+ set (H5_ENABLE_STATIC_LIB NO)
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
+endif ()
+
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
#-----------------------------------------------------------------------------
@@ -860,6 +872,30 @@ if (BUILD_TESTING)
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+ option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_SERIAL)
+
+ option (HDF5_TEST_TOOLS "Execute tools tests" ON)
+ mark_as_advanced (HDF5_TEST_TOOLS)
+
+ option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
+ mark_as_advanced (HDF5_TEST_EXAMPLES)
+
+ option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
+ mark_as_advanced (HDF5_TEST_SWMR)
+
+ option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_PARALLEL)
+
+ option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
+ mark_as_advanced (HDF5_TEST_FORTRAN)
+
+ option (HDF5_TEST_CPP "Execute cpp tests" ON)
+ mark_as_advanced (HDF5_TEST_CPP)
+
+ option (HDF5_TEST_JAVA "Execute java tests" ON)
+ mark_as_advanced (HDF5_TEST_JAVA)
+
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (test)
diff --git a/MANIFEST b/MANIFEST
index bf6b460..b1b8f07 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1184,6 +1184,7 @@
./test/ttime.c
./test/trefer.c
./test/trefer_deprec.c
+./test/trefer_shutdown.c
./test/trefstr.c
./test/tselect.c
./test/tsizeslheap.h5
diff --git a/bin/trace b/bin/trace
index 50fd2f3..5db82b0 100755
--- a/bin/trace
+++ b/bin/trace
@@ -232,6 +232,7 @@ sub argstring ($$$) {
# certain type qualifiers, and indirection.
$atype =~ s/^\bconst\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
$atype =~ s/\s+/ /g;
$ptr = length $1 if $atype =~ s/(\*+)//;
$atype =~ s/^\s+//;
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 58d85c1..89d62f1 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -68,6 +68,6 @@ foreach (example ${tutr_examples})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 75efc3b..5e7134d 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -56,4 +56,6 @@ else ()
endif ()
set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
-include (CMakeTests.cmake)
+if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake
index f8d4cd6..4e292a7 100644
--- a/config/cmake_ext_mod/CTestCustom.cmake
+++ b/config/cmake_ext_mod/CTestCustom.cmake
@@ -2,14 +2,14 @@ set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
- "note.*expected.*void.*but argument is of type.*volatile"
- "SZIP.src.*:[ \t]*warning"
- "ZLIB.src.*:[ \t]*warning"
- "jpeg.src.*:[ \t]*warning"
- "POSIX name for this item is deprecated"
- "disabling jobserver mode"
- "warning.*implicit declaration of function"
- "note: expanded from macro"
+ ".*note.*expected.*void.*but argument is of type.*volatile.*"
+ ".*src.SZIP.*:[ \t]*warning.*"
+ ".*src.ZLIB.*:[ \t]*warning.*"
+ ".*jpeg.src.*:[ \t]*warning.*"
+ ".*POSIX name for this item is deprecated.*"
+ ".*disabling jobserver mode.*"
+ ".*warning.*implicit declaration of function.*"
+ ".*note: expanded from macro.*"
)
set (CTEST_CUSTOM_MEMCHECK_IGNORE
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 885e4f7..6440c81 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -201,7 +201,7 @@ endif ()
if (TEST_REF_FILTER)
#message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 9f42f95..89cafc8 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -67,6 +67,6 @@ if (H5_HAVE_PARALLEL)
set_target_properties (ph5example PROPERTIES FOLDER examples)
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index ea3b2c5..fd7f1dc 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -64,38 +64,40 @@ set (test_ex_CLEANFILES
vds-eiger.h5
)
-# Remove any output file left over from previous test run
-add_test (
- NAME EXAMPLES-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
-)
-set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
+if (HDF5_TEST_SERIAL)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME EXAMPLES-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES}
+ )
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES)
-foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${example}>)
- else ()
- add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${example}.txt"
- #-D "TEST_REFERENCE=${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (EXAMPLES-${example} PROPERTIES FIXTURES_REQUIRED clear_EXAMPLES)
- if (last_test)
- set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "EXAMPLES-${example}")
-endforeach ()
+ foreach (example ${examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${example}>)
+ else ()
+ add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${example}.txt"
+ #-D "TEST_REFERENCE=${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (EXAMPLES-${example} PROPERTIES FIXTURES_REQUIRED clear_EXAMPLES)
+ if (last_test)
+ set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "EXAMPLES-${example}")
+ endforeach ()
+endif ()
### Windows pops up a modal permission dialog on this test
-if (H5_HAVE_PARALLEL AND NOT WIN32)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME MPI_TEST_EXAMPLES-ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5example> ${MPIEXEC_POSTFLAGS})
else ()
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index e8dddd3..be98963 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -173,6 +173,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
endif ()
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 5e7dfa8..a52375b 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -16,77 +16,79 @@
##############################################################################
##############################################################################
-set (test_ex_fortran_CLEANFILES
- compound.h5
- copy1.h5
- copy2.h5
- dsetf.h5
- extend.h5
- FORTRAN.h5
- groupf.h5
- groupsf.h5
- h5_cmprss.h5
- mount1.h5
- mount2.h5
- sdsf.h5
- subset.h5
- SDScompound.h5
- test.h5
-)
+if (HDF5_TEST_SERIAL)
+ set (test_ex_fortran_CLEANFILES
+ compound.h5
+ copy1.h5
+ copy2.h5
+ dsetf.h5
+ extend.h5
+ FORTRAN.h5
+ groupf.h5
+ groupsf.h5
+ h5_cmprss.h5
+ mount1.h5
+ mount2.h5
+ sdsf.h5
+ subset.h5
+ SDScompound.h5
+ test.h5
+ )
-# Remove any output file left over from previous test run
-add_test (
- NAME f90_ex-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
-)
-set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME f90_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
+ )
+ set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
-foreach (example ${examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f90_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f90_ex_${example}>)
- else ()
- add_test (NAME f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=f90_ex_${example}.txt"
- #-D "TEST_REFERENCE=f90_ex_${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (f90_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
- if (last_test)
- set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex_${example}")
-endforeach ()
+ foreach (example ${examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME f90_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f90_ex_${example}>)
+ else ()
+ add_test (NAME f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=f90_ex_${example}.txt"
+ #-D "TEST_REFERENCE=f90_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (f90_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
+ if (last_test)
+ set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "f90_ex_${example}")
+ endforeach ()
-foreach (example ${F2003_examples})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f03_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f03_ex_${example}>)
- else ()
- add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=f03_ex_${example}.txt"
- #-D "TEST_REFERENCE=f03_ex_${example}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (f03_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
- if (last_test)
- set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f03_ex_${example}")
-endforeach ()
+ foreach (example ${F2003_examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME f03_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f03_ex_${example}>)
+ else ()
+ add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=f03_ex_${example}.txt"
+ #-D "TEST_REFERENCE=f03_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (f03_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
+ if (last_test)
+ set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "f03_ex_${example}")
+ endforeach ()
+endif ()
-if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND MPI_Fortran_FOUND)
add_test (NAME MPI_TEST_f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
endif ()
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 4efd8a8..3c46c9e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -517,4 +517,6 @@ else ()
add_dependencies (vol_connector ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 0fe641f..17aa6c3 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -45,4 +45,6 @@ set_target_properties (parallel_test PROPERTIES
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index 2a71b47..bef034c 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -19,7 +19,7 @@ endif ()
#-- Build the Unit testing if requested
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- if (BUILD_TESTING)
+ if (BUILD_TESTING AND HDF5_TEST_SERIAL)
add_subdirectory (test)
endif ()
endif ()
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 50e08e8..4bd4807 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -23,6 +23,6 @@ else ()
endif ()
set_target_properties (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index cfb24a8..429e5c7 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -24,4 +24,6 @@ else ()
endif ()
set_target_properties (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
-include (CMakeTests.cmake)
+if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 86c1770..44115e5 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -39,8 +39,6 @@ foreach (example ${examples})
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
endforeach ()
-if (BUILD_TESTING)
-
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
-
endif ()
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index e41b8fe..449194e 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -52,6 +52,6 @@ foreach (example ${examples})
endif ()
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index c152142..369692d 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -61,4 +61,6 @@ foreach (h5_test ${H5_TESTS})
ADD_H5_FORTRAN_EXE(${h5_test})
endforeach ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 2959c6c..69f3dae 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -93,4 +93,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
set_target_properties (hl_gen_test_ld PROPERTIES FOLDER test/hl/gen)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 3cd913f..e12588b 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -67,7 +67,7 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_SERIAL)
# --------------------------------------------------------------------
# This executable can generate the actual test files - Currently not
# used in the CMake Build system as we rely on the test files that are
@@ -83,7 +83,9 @@ if (BUILD_TESTING)
# add_test (NAME hl_h52gifgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_h52gifgentest>)
endif ()
- include (CMakeTests.cmake)
+ if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+ endif ()
endif ()
#-----------------------------------------------------------------------------
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index b3d65f7..edb78c0 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -26,7 +26,7 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5watch-shared)
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
#-- Add swmr_check_compat_vfd program
set (hl_swmr_check_compat_vfd_SOURCES
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
@@ -68,7 +68,9 @@ if (BUILD_TESTING)
endif ()
set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)
- include (CMakeTests.cmake)
+ if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+ endif ()
endif ()
#-----------------------------------------------------------------------------
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 8849524..02b9fdf 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -71,7 +71,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH})
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${HDFJAVA_JAR}")
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index b83da0e..f32f645 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -56,7 +56,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH})
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${HDFJAVA_JAR}")
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 9e43087..e319a7f 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -55,7 +55,7 @@ foreach (h5_file ${HDF_JAVA_TEST_FILES})
endforeach ()
add_custom_target(H5Ex_G_Visit_files ALL COMMENT "Copying files needed by H5Ex_G_Visit tests" DEPENDS ${H5Ex_G_Visit_files_list})
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index b56e3ad..a1ccd6b 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -45,7 +45,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH})
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${HDFJAVA_JAR}")
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index dfb6e72..de7dc62 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -105,39 +105,41 @@ endif ()
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
-foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
- set (CMAKE_JAVA_CLASSPATH ".")
- foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
+if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
+ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
+ set (CMAKE_JAVA_CLASSPATH ".")
+ foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
+ endforeach ()
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
+
+ add_test (
+ NAME JUnit-${test_file}-clearall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ JUnit-${test_file}.out
+ JUnit-${test_file}.out.err
+ )
+ add_test (
+ NAME JUnit-${test_file}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
+ -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}"
+ -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
+ -D "TEST_PROGRAM=test.${test_file}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test"
+ -D "TEST_OUTPUT=JUnit-${test_file}.out"
+# -D "TEST_LOG_LEVEL=trace"
+ -D "TEST_EXPECT=0"
+ -D "SKIP_APPEND=1"
+ -D "TEST_MASK_ERROR=TRUE"
+# -D "TEST_FILTER:STRING=${testfilter}"
+ -D "TEST_REFERENCE=JUnit-${test_file}.txt"
+ -P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
+ )
+ set_tests_properties (JUnit-${test_file} PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
+ DEPENDS "JUnit-${test_file}-clearall-objects"
+ )
endforeach ()
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
-
- add_test (
- NAME JUnit-${test_file}-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- JUnit-${test_file}.out
- JUnit-${test_file}.out.err
- )
- add_test (
- NAME JUnit-${test_file}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
- -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}"
- -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
- -D "TEST_PROGRAM=test.${test_file}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
- -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test"
- -D "TEST_OUTPUT=JUnit-${test_file}.out"
-# -D "TEST_LOG_LEVEL=trace"
- -D "TEST_EXPECT=0"
- -D "SKIP_APPEND=1"
- -D "TEST_MASK_ERROR=TRUE"
-# -D "TEST_FILTER:STRING=${testfilter}"
- -D "TEST_REFERENCE=JUnit-${test_file}.txt"
- -P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
- )
- set_tests_properties (JUnit-${test_file} PROPERTIES
- ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
- DEPENDS "JUnit-${test_file}-clearall-objects"
- )
-endforeach ()
+endif ()
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 9ebc231..3cc0dea 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -48,6 +48,20 @@ New Features
Configuration:
-------------
+ - Added new options to CMake for control of testing
+
+ Added CMake options (default ON);
+ HDF5_TEST_SERIAL AND/OR HDF5_TEST_PARALLEL
+ combined with:
+ HDF5_TEST_TOOLS
+ HDF5_TEST_EXAMPLES
+ HDF5_TEST_SWMR
+ HDF5_TEST_FORTRAN
+ HDF5_TEST_CPP
+ HDF5_TEST_JAVA
+
+ (ADB - 2020/01/15, HDFFV-11001)
+
- Added Clang sanitizers to CMake for analyzer support
Added CMake code and files to execute the Clang sanitizers.
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 56fedee..fadde28 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -498,7 +498,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_SANITY_CHECK *aux_ptr,
+H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUSED *aux_ptr,
int sync_point_op)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index f8d7edc..fc5ea34 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -2063,7 +2063,7 @@ done:
*/
H5A_t *
H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info)
+ H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info)
{
H5A_t *attr_dst = NULL; /* Destination attribute */
hid_t tid_src = -1; /* Datatype ID for source datatype */
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index dcae07c..b5b1c03 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -87,7 +87,7 @@
*/
herr_t
H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t H5_ATTR_SANITY_CHECK *type, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t H5_ATTR_NDEBUG_UNUSED *type, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
unsigned u; /* Local index variable */
@@ -182,7 +182,7 @@ done:
*/
herr_t
H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_internal_t *internal = NULL; /* B-tree internal node */
@@ -294,7 +294,7 @@ done:
*/
herr_t
H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index f08237e..92c802e 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -1355,7 +1355,7 @@ done:
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr, const H5B2_internal_t *internal)
+H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal)
{
hsize_t tot_all_nrec; /* Total number of records at or below this node */
uint16_t u, v; /* Local index variables */
@@ -1396,7 +1396,7 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_C
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_internal2(hsize_t parent_all_nrec, const H5_ATTR_SANITY_CHECK H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
+H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
{
hsize_t tot_all_nrec; /* Total number of records at or below this node */
uint16_t u, v; /* Local index variables */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index b50efad..7ed0468 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -1027,8 +1027,8 @@ done:
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr,
- const H5B2_leaf_t H5_ATTR_SANITY_CHECK *leaf)
+H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
+ const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf)
{
/* General sanity checking on node */
HDassert(leaf->nrec <= hdr->node_info->split_nrec);
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index 38aedf9..5ac354d 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -1281,7 +1281,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_SANITY_CHECK *config,
+H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_NDEBUG_UNUSED *config,
herr_t fxn_ret_value)
{
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index aea4672..098e01b 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -253,7 +253,7 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_new_node(H5F_t H5_ATTR_SANITY_CHECK *f, H5B_ins_t op, void *_lt_key, void *_udata,
+H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key, void *_udata,
void *_rt_key, haddr_t *addr_p/*out*/)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
@@ -536,7 +536,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5D__btree_insert(H5F_t H5_ATTR_SANITY_CHECK *f, haddr_t H5_ATTR_SANITY_CHECK addr, void *_lt_key, hbool_t *lt_key_changed,
+H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED addr, void *_lt_key, hbool_t *lt_key_changed,
void *_md_key, void *_udata, void *_rt_key, hbool_t H5_ATTR_UNUSED *rt_key_changed,
haddr_t *new_node_p/*out*/)
{
diff --git a/src/H5Dint.c b/src/H5Dint.c
index a73d7ff..436a507 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -89,7 +89,7 @@ static herr_t H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overw
hsize_t old_dim[]);
static herr_t H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id);
static herr_t H5D__close_cb(H5VL_object_t *dset_vol_obj);
-static herr_t H5D__use_minimized_dset_headers(H5F_t *file, H5D_t *dset, hbool_t *minimize);
+static herr_t H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize);
static herr_t H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc);
static size_t H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr);
static void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);
@@ -737,14 +737,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__use_minimized_dset_headers(H5F_t *file, H5D_t H5_ATTR_SANITY_CHECK *dset, hbool_t *minimize)
+H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT;
HDassert(file);
- HDassert(dset);
HDassert(minimize);
/* Get the dataset object header minimize flag for this call */
@@ -1015,7 +1014,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info")
} /* end if */
- if(H5D__use_minimized_dset_headers(file, dset, &minimize_header) == FAIL)
+ if(H5D__use_minimized_dset_headers(file, &minimize_header) == FAIL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings")
if(TRUE == minimize_header) {
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index eb4e6b8..2093512 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -378,7 +378,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src,
+H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index 3d7400d..8efa771 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -437,7 +437,7 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src,
+H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 9aeb555..1d182a4 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -1543,7 +1543,7 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -2080,7 +2080,7 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 6b47828..58e255a 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -279,7 +279,7 @@ END_FUNC(STATIC) /* end H5EA__test_encode() */
*/
BEGIN_FUNC(STATIC, NOERR,
herr_t, SUCCEED, -,
-H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_SANITY_CHECK *_ctx))
+H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_NDEBUG_UNUSED *_ctx))
/* Local variables */
#ifndef NDEBUG
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index acc21af..922153c 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -253,7 +253,7 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -651,7 +651,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -1178,7 +1178,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5FS.c b/src/H5FS.c
index bd89bed..1bd56b8 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -665,14 +665,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_size(const H5F_t H5_ATTR_SANITY_CHECK *f, const H5FS_t *fspace, hsize_t *meta_size)
+H5FS_size(const H5FS_t *fspace, hsize_t *meta_size)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
*/
- HDassert(f);
HDassert(fspace);
HDassert(meta_size);
diff --git a/src/H5FScache.c b/src/H5FScache.c
index c2895e2..d5f2817 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -241,7 +241,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5FS_t *fspace = NULL; /* Free space header info */
@@ -404,8 +404,8 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len)
*/
static herr_t
H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing,
- haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t H5_ATTR_SANITY_CHECK *new_addr,
- size_t H5_ATTR_SANITY_CHECK *new_len, unsigned *flags)
+ haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t H5_ATTR_NDEBUG_UNUSED *new_addr,
+ size_t H5_ATTR_NDEBUG_UNUSED *new_len, unsigned *flags)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
@@ -694,7 +694,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
@@ -979,8 +979,8 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static void *
-H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
- hbool_t H5_ATTR_SANITY_CHECK *dirty)
+H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
+ hbool_t H5_ATTR_NDEBUG_UNUSED *dirty)
{
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */
H5FS_t *fspace; /* free space manager */
@@ -1026,9 +1026,9 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK le
/* Check for any serialized sections */
if(fspace->serial_sect_count > 0) {
hsize_t old_tot_sect_count; /* Total section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_serial_sect_count; /* Total serializable section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_ghost_sect_count; /* Total ghost section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_tot_space; /* Total space managed from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_serial_sect_count; /* Total serializable section count from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */
unsigned sect_cnt_size; /* The size of the section size counts */
/* Compute the size of the section counts */
@@ -1178,7 +1178,7 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
*/
static herr_t
H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr,
- size_t H5_ATTR_SANITY_CHECK len, haddr_t *new_addr, size_t H5_ATTR_SANITY_CHECK *new_len,
+ size_t H5_ATTR_NDEBUG_UNUSED len, haddr_t *new_addr, size_t H5_ATTR_NDEBUG_UNUSED *new_len,
unsigned *flags)
{
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index 31fc63c..d2e1f90 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -182,7 +182,7 @@ H5_DLL H5FS_t *H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_c
H5_DLL H5FS_t *H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses,
const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment,
hsize_t threshold);
-H5_DLL herr_t H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size);
+H5_DLL herr_t H5FS_size(const H5FS_t *fspace, hsize_t *meta_size);
H5_DLL herr_t H5FS_delete(H5F_t *f, haddr_t fs_addr);
H5_DLL herr_t H5FS_close(H5F_t *f, H5FS_t *fspace);
H5_DLL herr_t H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr);
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index f17ef15..f95f13d 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -344,7 +344,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -434,7 +434,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_super_t *sblock = NULL; /* File's superblock */
@@ -867,7 +867,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -911,7 +911,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
@@ -1006,7 +1006,7 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 83c1f0c..35b90f3 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -762,7 +762,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_SANITY_CHECK *_lt_key/*in,out*/,
+H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key/*in,out*/,
hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/,
void *_udata/*in,out*/, void *_rt_key/*in,out*/,
hbool_t *rt_key_changed/*out*/)
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 1d76ba3..4a2ff91 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -403,7 +403,7 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
H5HF_hdr_t hdr; /* Temporary fractal heap header */
@@ -749,7 +749,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */
@@ -979,7 +979,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static void *
-H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
@@ -1326,7 +1326,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
@@ -1471,8 +1471,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
else {
/* if this is a child iblock, verify that the pointers are */
/* either uninitialized or set up correctly. */
- H5HF_indirect_t H5_ATTR_SANITY_CHECK *par_iblock = iblock->parent;
- unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index in parent's child iblock pointer array */
+ H5HF_indirect_t H5_ATTR_NDEBUG_UNUSED *par_iblock = iblock->parent;
+ unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
@@ -2438,8 +2438,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
- size_t H5_ATTR_SANITY_CHECK len, void *_thing)
+H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
+ size_t H5_ATTR_NDEBUG_UNUSED len, void *_thing)
{
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 1514c53..c11bc34 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -1185,9 +1185,9 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */
haddr_t dblock_addr; /* Direct block address */
size_t dblock_size; /* Direct block size */
- size_t H5_ATTR_SANITY_CHECK dblock_overhead; /* Direct block's overhead */
unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
- herr_t H5_ATTR_SANITY_CHECK status; /* Generic status value */
+ size_t H5_ATTR_NDEBUG_UNUSED dblock_overhead; /* Direct block's overhead */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Generic status value */
/* Sanity check settings for section's direct block's parent */
iblock = sect->u.single.parent;
@@ -2038,7 +2038,7 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
const H5HF_hdr_t *hdr; /* Fractal heap header */
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
- unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index of row in underlying indirect section's row array */
+ unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index of row in underlying indirect section's row array */
FUNC_ENTER_STATIC_NOERR
@@ -4125,7 +4125,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
dir_nrows = (max_dir_row - start_row) + 1;
HDassert(dir_nrows == sect->u.indirect.dir_nrows);
for(u = 0; u < dir_nrows; u++) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect; /* Pointer to row section */
tmp_row_sect = sect->u.indirect.dir_rows[u];
HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
@@ -4133,7 +4133,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
HDassert(tmp_row_sect->u.row.under == sect);
HDassert(tmp_row_sect->u.row.row == (start_row + u));
if(u > 0) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect2; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect2; /* Pointer to row section */
tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1];
HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
@@ -4160,7 +4160,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
HDassert(tmp_child_sect->u.indirect.parent == sect);
if(u > 0) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_child_sect2; /* Pointer to child indirect section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_child_sect2; /* Pointer to child indirect section */
tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1];
HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 37a0502..ad5ff0f 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -447,7 +447,7 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size)
/* Get free space metadata size */
if(hdr->fspace) {
- if(H5FS_size(hdr->f, hdr->fspace, fs_size) < 0)
+ if(H5FS_size(hdr->fspace, fs_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info")
} /* end if */
else
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index a2a9318..18625cc 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -202,7 +202,7 @@ H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *imag
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *udata, size_t *actual_len)
{
H5HG_heap_t heap; /* Global heap */
@@ -432,7 +432,7 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG__cache_heap_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image, size_t len,
+H5HG__cache_heap_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image, size_t len,
void *_thing)
{
H5HG_heap_t *heap = (H5HG_heap_t *)_thing;
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 966ef40..b0ac05f 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -364,7 +364,7 @@ H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *im
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -415,7 +415,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HL_t *heap = NULL; /* Local heap */
@@ -555,7 +555,7 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_prefix_serialize(const H5_ATTR_SANITY_CHECK H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
@@ -826,8 +826,8 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
- size_t H5_ATTR_SANITY_CHECK len, void *_thing)
+H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
+ size_t H5_ATTR_NDEBUG_UNUSED len, void *_thing)
{
H5HL_t *heap; /* Pointer to the local heap */
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
diff --git a/src/H5MF.c b/src/H5MF.c
index c100637..df1c88a 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2290,7 +2290,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
/* Retrieve free space size from free space manager */
if(H5FS_sect_stats(f->shared->fs_man[type], &type_fs_size, NULL) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats")
- if(H5FS_size(f, f->shared->fs_man[type], &type_meta_size) < 0)
+ if(H5FS_size(f->shared->fs_man[type], &type_meta_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space metadata stats")
/* Increment total free space for types */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index d8e13c5..2d95ee9 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -334,7 +334,7 @@ H5O__ainfo_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_SANITY_CHECK *open_oh, void *_mesg)
+H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
{
H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
@@ -405,9 +405,9 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5O__ainfo_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, void *mesg_src, H5F_t *file_dst,
+H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info, void H5_ATTR_UNUSED *udata)
+ H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src;
H5O_ainfo_t *ainfo_dst = NULL;
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 698fc19..8850ef6 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -111,7 +111,7 @@ H5FL_EXTERN(H5O_cont_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__add_gap(H5F_t H5_ATTR_SANITY_CHECK *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
+H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
size_t idx, uint8_t *new_gap_loc, size_t new_gap_size)
{
hbool_t merged_with_null; /* Whether the gap was merged with a null message */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index a977594..8bad181 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -201,7 +201,7 @@ H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
@@ -306,7 +306,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5O__cache_deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t *dirty)
{
H5O_t *oh = NULL; /* Object header read in */
@@ -763,7 +763,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t *dirty)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index b835f8e..f53eb4a 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -383,7 +383,8 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
H5F_addr_encode(dst_oloc->file, &p, dst_oloc->addr);
if(H5R__set_obj_token(ref, (const H5VL_token_t *)&tmp_token, token_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token")
- if(H5R__set_loc_id(ref, dst_loc_id, TRUE) < 0)
+ /* Do not set app_ref since references are released once the copy is done */
+ if(H5R__set_loc_id(ref, dst_loc_id, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id")
} /* end for */
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 1623769..d66ea69 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1686,7 +1686,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_reset_share(unsigned H5_ATTR_SANITY_CHECK type_id, void *mesg)
+H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 3798cdf..b49e501 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -589,9 +589,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O__shared_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, H5F_t *file_dst,
+H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info,
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info,
void H5_ATTR_UNUSED *udata)
{
const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index f0fced4..e4ad980 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -381,7 +381,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5_INLINE herr_t
-H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_SANITY_CHECK *oloc_src, const void *mesg_src,
+H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const void *mesg_src,
H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags,
H5O_copy_t *cpy_info)
{
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index c046bba..3668229 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5755,7 +5755,7 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
const H5VL_connector_prop_t *info2 = (const H5VL_connector_prop_t *)_info2;
H5VL_class_t *cls1, *cls2; /* connector class for each property */
int cmp_value = 0; /* Value from comparison */
- herr_t H5_ATTR_SANITY_CHECK status; /* Status from info comparison */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Status from info comparison */
int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Pint.c b/src/H5Pint.c
index c3c6f62..0810427 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -2780,7 +2780,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
H5P_genprop_t *prop, void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -2827,7 +2827,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_SANITY_CHECK *name, H5P_genprop_t *prop,
+H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *name, H5P_genprop_t *prop,
void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -4260,7 +4260,7 @@ property list class.
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P__iterate_pclass_cb(void *_item, void H5_ATTR_SANITY_CHECK *_key, void *_udata)
+H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_udata)
{
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */
@@ -4396,7 +4396,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__peek_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
H5P_genprop_t *prop, void *_udata)
{
H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 6e79e35..6e582fb 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -567,7 +567,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_
if(obj1 == NULL && obj2 != NULL) HGOTO_DONE(1);
if(obj1 != NULL && obj2 == NULL) HGOTO_DONE(-1);
if(obj1 && obj2) {
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
status = H5P__cmp_plist(obj1, obj2, &ret_value);
HDassert(status >= 0);
diff --git a/src/H5R.c b/src/H5R.c
index f5d119f..3a022eb 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -139,7 +139,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
@@ -232,7 +232,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
@@ -321,7 +321,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 46e4c0c..cef1f0a 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -433,8 +433,15 @@ H5R__destroy(H5R_ref_priv_t *ref)
} /* end switch */
/* Decrement refcount of attached loc_id */
- if(ref->type && (ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ if(ref->type && (ref->loc_id != H5I_INVALID_HID)) {
+ if(ref->app_ref) {
+ if(H5I_dec_app_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ } else {
+ if(H5I_dec_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ }
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -451,7 +458,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref)
+H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -460,14 +467,26 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref)
HDassert(ref != NULL);
HDassert(id != H5I_INVALID_HID);
- /* If a location ID was previously assigned, decrement refcount and assign new one */
- if((ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ /* If a location ID was previously assigned, decrement refcount and
+ * assign new one */
+ if((ref->loc_id != H5I_INVALID_HID)) {
+ if(ref->app_ref) {
+ if(H5I_dec_app_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ } else {
+ if(H5I_dec_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ }
+ }
ref->loc_id = id;
- /* Prevent location ID from being freed until reference is destroyed */
- if(inc_ref && H5I_inc_ref(ref->loc_id, FALSE) < 0)
+ /* Prevent location ID from being freed until reference is destroyed,
+ * set app_ref if necessary as references are exposed to users and are
+ * expected to be destroyed, this allows the loc_id to be cleanly released
+ * on shutdown if users fail to call H5Rdestroy(). */
+ if(inc_ref && H5I_inc_ref(ref->loc_id, app_ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed")
+ ref->app_ref = app_ref;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -559,7 +578,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5I_INVALID_HID, "unable to make file 'post open' callback")
/* Attach loc_id to reference */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference")
done:
@@ -711,7 +730,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
dst_ref->ref.obj.filename = NULL;
/* Set location ID and hold reference to it */
- if(H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE) < 0)
+ if(H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "cannot set reference location ID")
}
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 7471487..4dbc656 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -79,7 +79,7 @@ typedef struct H5R_ref_priv_t {
uint32_t encode_size; /* Cached encoding size */
int8_t type; /* Reference type */
uint8_t token_size; /* Cached token size */
- char unused[18]; /* Unused */
+ hbool_t app_ref; /* App ref on loc_id */
} H5R_ref_priv_t;
/*****************************/
@@ -95,7 +95,7 @@ H5_DLL herr_t H5R__create_region(const H5VL_token_t *obj_token, size_t token_s
H5_DLL herr_t H5R__create_attr(const H5VL_token_t *obj_token, size_t token_size, const char *attr_name, H5R_ref_priv_t *ref);
H5_DLL herr_t H5R__destroy(H5R_ref_priv_t *ref);
-H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref);
+H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref);
H5_DLL hid_t H5R__get_loc_id(const H5R_ref_priv_t *ref);
H5_DLL hid_t H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id);
diff --git a/src/H5SL.c b/src/H5SL.c
index 7ca70b3..ff8edb8 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -652,7 +652,7 @@ int H5SL_term_package(void)
/* Terminate all the factories */
if(H5SL_fac_nused_g > 0) {
size_t i;
- herr_t H5_ATTR_SANITY_CHECK ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
for(i = 0; i < H5SL_fac_nused_g; i++) {
ret = H5FL_fac_term(H5SL_fac_g[i]);
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 1d5cd03..6d0f2b0 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -212,7 +212,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static void *
-H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_t *f; /* File pointer -- from user data */
@@ -364,7 +364,7 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to encode */
@@ -568,7 +568,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
*-------------------------------------------------------------------------
*/
static void *
-H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5SM_list_t *list = NULL; /* The SOHM list being read in */
@@ -687,7 +687,7 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5SM_list_t *list = (H5SM_list_t *)_thing ; /* Instance being serialized */
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index c316cad..29fd582 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1848,7 +1848,7 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
for(i = 0; i < priv->src_nmembs; i++)
if(src2dst[i] >= 0) {
- int H5_ATTR_SANITY_CHECK status;
+ int H5_ATTR_NDEBUG_UNUSED status;
status = H5I_dec_ref(src_memb_id[i]);
HDassert(status >= 0);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 9205ed1..78966cf 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -622,8 +622,9 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
if((file_id = H5F_get_file_id(src_file, H5I_FILE, FALSE)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
- /* Attach loc ID to reference and hold reference to it */
- if(H5R__set_loc_id(dst_ref, file_id, TRUE) < 0)
+ /* Attach loc ID to reference and hold reference to it, this is a
+ * user exposed reference so set app_ref to TRUE. */
+ if(H5R__set_loc_id(dst_ref, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
} /* end if */
@@ -783,7 +784,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_SANITY_CHECK src_size,
+H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_NDEBUG_UNUSED src_size,
H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, size_t dst_size)
{
const uint8_t *p = (const uint8_t *)src_buf;
diff --git a/src/H5private.h b/src/H5private.h
index e853cf0..c3375df 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -305,20 +305,20 @@
*/
#ifdef __cplusplus
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_SANITY_CHECK /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#else /* __cplusplus */
#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z)))
# define H5_ATTR_UNUSED __attribute__((unused))
#ifndef NDEBUG
-#define H5_ATTR_SANITY_CHECK /*void*/
+#define H5_ATTR_NDEBUG_UNUSED /*void*/
#else /* NDEBUG */
-#define H5_ATTR_SANITY_CHECK H5_ATTR_UNUSED
+#define H5_ATTR_NDEBUG_UNUSED H5_ATTR_UNUSED
#endif /* NDEBUG */
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
@@ -330,12 +330,12 @@
#endif
#else
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_SANITY_CHECK /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#endif
#endif /* __cplusplus */
@@ -2050,7 +2050,7 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_COMMON(asrt) \
- hbool_t H5_ATTR_SANITY_CHECK err_occurred = FALSE; \
+ hbool_t err_occurred = FALSE; \
\
FUNC_ENTER_CHECK_NAME(asrt);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c7a945e..77f9191 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -525,4 +525,6 @@ else ()
endif ()
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
-include (CMakeTests.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index cf938f5..d4a5ddc 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -15,7 +15,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-# included from CMakeTEsts.cmake
+# included from CMakeTests.cmake
set (VFD_LIST
sec2
diff --git a/test/cache_common.c b/test/cache_common.c
index 3aff5ec..696eae3 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -554,7 +554,7 @@ addr_to_type_and_index(haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
+get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -664,7 +664,7 @@ notify_get_initial_load_size(void *udata, size_t *image_length)
*/
static herr_t
get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED image_len,
- void *udata, size_t *actual_len, int32_t H5_ATTR_SANITY_CHECK entry_type)
+ void *udata, size_t *actual_len, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -725,7 +725,7 @@ variable_get_final_load_size(const void *image, size_t image_len,
static htri_t
verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata,
- int32_t H5_ATTR_SANITY_CHECK entry_type)
+ int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -778,8 +778,8 @@ variable_verify_chksum(const void *image, size_t len, void *udata)
*-------------------------------------------------------------------------
*/
static void *
-deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *udata, hbool_t *dirty,
- int32_t H5_ATTR_SANITY_CHECK entry_type)
+deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hbool_t *dirty,
+ int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -935,7 +935,7 @@ notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
*-------------------------------------------------------------------------
*/
herr_t
-image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
+image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
const test_entry_t *entry;
int32_t type;
@@ -1053,10 +1053,10 @@ notify_image_len(const void *thing, size_t *image_length)
*-------------------------------------------------------------------------
*/
herr_t
-pre_serialize(H5F_t H5_ATTR_SANITY_CHECK *f,
+pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f,
void *thing,
- haddr_t H5_ATTR_SANITY_CHECK addr,
- size_t H5_ATTR_SANITY_CHECK len,
+ haddr_t H5_ATTR_NDEBUG_UNUSED addr,
+ size_t H5_ATTR_NDEBUG_UNUSED len,
haddr_t *new_addr_ptr,
size_t *new_len_ptr,
unsigned *flags_ptr)
@@ -1444,7 +1444,7 @@ notify_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len,
*-------------------------------------------------------------------------
*/
static herr_t
-notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_SANITY_CHECK entry_type)
+notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
@@ -1521,7 +1521,7 @@ notify_notify(H5C_notify_action_t action, void *thing)
*-------------------------------------------------------------------------
*/
herr_t
-free_icr(test_entry_t *entry, int32_t H5_ATTR_SANITY_CHECK entry_type)
+free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
HDassert(entry);
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 8354e09..b77a198 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -3889,9 +3889,10 @@ check_invalid_tag_application(void)
#if H5C_DO_TAGGING_SANITY_CHECKS
error:
if(api_ctx_pushed) H5CX_pop();
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
return 1;
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+
} /* check_invalid_tag_application */
diff --git a/test/dsets.c b/test/dsets.c
index db209e2da..8b797f6 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7549,7 +7549,7 @@ test_deprec(hid_t file)
hid_t dataset, space, small_space, create_parms, dcpl;
hsize_t dims[2], small_dims[2];
hsize_t deprec_size;
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
hsize_t csize[2];
TESTING("deprecated API routines");
diff --git a/test/dtypes.c b/test/dtypes.c
index 891969b..4bdef59 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6732,7 +6732,7 @@ static void create_del_obj_named_test_file(const char *filename, hid_t fapl,
hid_t my_fapl; /* Copy of file access property list ID */
hid_t dcpl; /* Dataset creation property list ID */
unsigned use_at_least_v18;/* Whether to use old or new format */
- herr_t H5_ATTR_SANITY_CHECK status; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Generic return value */
/* Make copy of FAPL */
my_fapl = H5Pcopy(fapl);
diff --git a/test/mf.c b/test/mf.c
index 031e625..6030314 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -7529,8 +7529,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
- hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
@@ -7539,7 +7538,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi
hbool_t relax;
H5FD_mem_t mt;
- HDassert(multi || split);
+ HDassert(split);
HDmemset(memb_name, 0, sizeof memb_name);
@@ -7616,7 +7615,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if((fapl_new = H5Pcopy(fapl)) < 0) TEST_ERROR
if(multi || split)
- if(set_multi_split(fapl_new, 4096, multi, split) < 0)
+ if(set_multi_split(fapl_new, 4096, split) < 0)
TEST_ERROR;
/* Test with TRUE or FALSE for persisting free-space */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 4789bc4..79ba43f 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -39,28 +39,24 @@
#define FILENAME_LEN 1024
-#ifndef H5_HAVE_PARALLEL
-#define NUM_DSETS 5
-#define NX 100
-#define NY 50
-#endif
-
-/* helper routines */
-#ifndef H5_HAVE_PARALLEL
-static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
-static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
-#endif /* H5_HAVE_PARALLEL */
-
/* test routines */
#ifdef H5_HAVE_PARALLEL
static unsigned verify_page_buffering_disabled(hid_t orig_fapl,
const char *env_h5_drvr);
#else
+#define NUM_DSETS 5
+#define NX 100
+#define NY 50
+
static unsigned test_args(hid_t fapl, const char *env_h5_drvr);
static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr);
+
+/* helper routines */
+static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
+static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
#endif /* H5_HAVE_PARALLEL */
const char *FILENAME[] = {
diff --git a/test/tfile.c b/test/tfile.c
index a900a8b..351c393 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -4209,8 +4209,7 @@ test_filespace_info(const char *env_h5_drvr)
**
*****************************************************************/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
- hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
@@ -4219,7 +4218,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi
hbool_t relax;
H5FD_mem_t mt;
- HDassert(split || multi);
+ HDassert(split);
HDmemset(memb_name, 0, sizeof memb_name);
@@ -4310,7 +4309,7 @@ test_file_freespace(const char *env_h5_drvr)
my_fapl = new_fapl;
if(multi_vfd || split_vfd) {
- ret = set_multi_split(new_fapl, FSP_SIZE_DEF, multi_vfd, split_vfd);
+ ret = set_multi_split(new_fapl, FSP_SIZE_DEF, split_vfd);
CHECK(ret, FAIL, "set_multi_split");
}
@@ -4476,7 +4475,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Set up paged aligned address space for multi/split driver */
if(multi_vfd || split_vfd) {
- ret = set_multi_split(fapl, FSP_SIZE_DEF, multi_vfd, split_vfd);
+ ret = set_multi_split(fapl, FSP_SIZE_DEF, split_vfd);
CHECK(ret, FAIL, "set_multi_split");
}
diff --git a/test/tmisc.c b/test/tmisc.c
index 93bdf29..62d9cd4 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -135,7 +135,6 @@ typedef struct
#ifndef H5_HAVE_PARALLEL
#define MISC8_DSETNAME2 "Dataset2"
#define MISC8_DSETNAME3 "Dataset3"
-#define MISC8_DSETNAME4 "Dataset4"
#define MISC8_DSETNAME6 "Dataset6"
#define MISC8_DSETNAME7 "Dataset7"
#define MISC8_DSETNAME9 "Dataset9"
diff --git a/test/trefer_shutdown.c b/test/trefer_shutdown.c
new file mode 100644
index 0000000..89a44b3
--- /dev/null
+++ b/test/trefer_shutdown.c
@@ -0,0 +1,83 @@
+#include "h5test.h"
+
+int
+main(int argc, char **argv)
+{
+ H5R_ref_t write_ref, read_ref;
+ hid_t fid;
+ hid_t did;
+ hid_t sid;
+ int i;
+
+ if ((fid = H5Fcreate("HDFFV-10992.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ HDfprintf(stderr, "H5Fcreate failed\n");
+ return 1;
+ }
+
+ if ((sid = H5Screate(H5S_SCALAR)) < 0) {
+ HDfprintf(stderr, "H5Screate failed\n");
+ return 1;
+ }
+
+ /* Create a dataset of object references */
+ if ((did = H5Dcreate2(fid, "dset", H5T_STD_REF, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ HDfprintf(stderr, "H5Dcreate failed\n");
+ return 1;
+ }
+
+ for (i = 0; i < 100; i++) {
+ /* Create reference to the root group */
+ if (H5Rcreate_object(fid, "/dset", H5P_DEFAULT, &write_ref) < 0) {
+ HDfprintf(stderr, "H5Rcreate_object failed\n");
+ return 1;
+ }
+ }
+
+ /* Write reference to dataset */
+ if (H5Dwrite(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &write_ref) < 0) {
+ HDfprintf(stderr, "H5Dwrite failed\n");
+ return 1;
+ }
+
+ for (i = 0; i < 500; i++) {
+ /* Read reference back into different reference buffer */
+ if (H5Dread(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &read_ref) < 0) {
+ HDfprintf(stderr, "H5Dread failed\n");
+ return 1;
+ }
+ }
+
+ /*
+ * "Forget" to call H5Rdestroy on reference objects. If H5Rdestroy
+ * is called at least once on either reference object, or both
+ * objects, the infinite loop goes away. If H5Rdestroy is never
+ * called, the infinite loop will appear.
+ */
+#if 0
+ if (H5Rdestroy(&write_ref) < 0) {
+ HDfprintf(stderr, "H5Rdestroy on reference write buffer failed\n");
+ return 1;
+ }
+ if (H5Rdestroy(&read_ref) < 0) {
+ HDfprintf(stderr, "H5Rdestroy on reference read buffer failed\n");
+ return 1;
+ }
+#endif
+
+ if (H5Sclose(sid) < 0) {
+ HDfprintf(stderr, "H5Sclose failed\n");
+ return 1;
+ }
+
+ if (H5Dclose(did) < 0) {
+ HDfprintf(stderr, "H5Dclose failed\n");
+ return 1;
+ }
+
+ if (H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "H5Fclose failed\n");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/test/tselect.c b/test/tselect.c
index 348d30a..db7c9de 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1614,7 +1614,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
****************************************************************/
static void
verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
- size_t H5_ATTR_SANITY_CHECK cube_size, unsigned edge_size, unsigned cube_rank)
+ size_t H5_ATTR_NDEBUG_UNUSED cube_size, unsigned edge_size, unsigned cube_rank)
{
const uint16_t *cube_ptr; /* Pointer into the cube buffer */
uint16_t expected_value; /* Expected value in dataset */
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 9795c65..3e4957d 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -79,4 +79,6 @@ foreach (h5_testp ${H5P_TESTS})
ADD_H5P_EXE(${h5_testp})
endforeach ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_PARALLEL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index d48dfca..711f587 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -3891,8 +3891,6 @@ actual_io_mode_tests(void) {
* Programmer: Jonathan Kim
* Date: Aug, 2012
*/
-#define DSET_NOCOLCAUSE "nocolcause"
-#define NELM 2
#define FILE_EXTERNAL "nocolcause_extern.data"
static void
test_no_collective_cause_mode(int selection_mode)
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 6b94e10..d1dc820 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -2379,7 +2379,7 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr)
*-------------------------------------------------------------------------
*/
static void *
-datum_deserialize(const void H5_ATTR_SANITY_CHECK *image_ptr,
+datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr,
H5_ATTR_UNUSED size_t len,
void * udata_ptr,
hbool_t * dirty_ptr)
@@ -2492,7 +2492,7 @@ datum_image_len(const void *thing, size_t *image_len)
*/
static herr_t
datum_serialize(const H5F_t *f,
- void H5_ATTR_SANITY_CHECK *image_ptr,
+ void H5_ATTR_NDEBUG_UNUSED *image_ptr,
size_t len,
void *thing_ptr)
{
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 92d2769..d7fc991 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -510,8 +510,8 @@ h5diff(const char *fname1,
const char *objname2,
diff_opt_t *opts)
{
- hid_t file1_id = -1;
- hid_t file2_id = -1;
+ hid_t file1_id = H5I_INVALID_HID;
+ hid_t file2_id = H5I_INVALID_HID;
char filenames[2][MAX_FILENAME];
hsize_t nfound = 0;
int l_ret1 = -1;
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 98b9db3..f671b06 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -487,7 +487,7 @@ static hsize_t diff_datum(
case H5T_COMPOUND:
H5TOOLS_DEBUG("diff_datum H5T_COMPOUND");
{
- hid_t memb_type = -1;
+ hid_t memb_type = H5I_INVALID_HID;
nmembs = members->n;
for (j = 0; j < nmembs; j++) {
@@ -698,7 +698,7 @@ static hsize_t diff_datum(
*/
case H5T_ARRAY:
{
- hid_t memb_type = -1;
+ hid_t memb_type = H5I_INVALID_HID;
hsize_t adims[H5S_MAX_RANK];
int ndims;
@@ -734,8 +734,8 @@ static hsize_t diff_datum(
H5TOOLS_GOTO_DONE(opts->err_stat);
}
else if (!iszero1 && !iszero2) {
- hid_t obj1_id = -1;
- hid_t obj2_id = -1;
+ hid_t obj1_id = H5I_INVALID_HID;
+ hid_t obj2_id = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_STD_REF
@@ -744,8 +744,8 @@ static hsize_t diff_datum(
*/
if (H5Tequal(m_type, H5T_STD_REF)) {
/* if (type_size == H5R_STD_REF_SIZE) */
- hid_t region1_id = -1;
- hid_t region2_id = -1;
+ hid_t region1_id = H5I_INVALID_HID;
+ hid_t region2_id = H5I_INVALID_HID;
H5R_ref_t *ref1_buf = (const H5R_ref_t *)_mem1;
H5R_ref_t *ref2_buf = (const H5R_ref_t *)_mem2;
H5O_type_t obj1_type = -1; /* Object type */
@@ -1024,8 +1024,8 @@ static hsize_t diff_datum(
*/
else if (H5Tequal(m_type, H5T_STD_REF_DSETREG)) {
/* if (type_size == H5R_DSET_REG_REF_BUF_SIZE) */
- hid_t region1_id = -1;
- hid_t region2_id = -1;
+ hid_t region1_id = H5I_INVALID_HID;
+ hid_t region2_id = H5I_INVALID_HID;
H5TOOLS_INFO("H5T_STD_REF_DSETREG reference type");
@@ -1113,7 +1113,7 @@ static hsize_t diff_datum(
*/
case H5T_VLEN:
{
- hid_t memb_type = -1;
+ hid_t memb_type = H5I_INVALID_HID;
H5TOOLS_DEBUG("diff_datum H5T_VLEN");
/* get the VL sequences's base datatype for each element */
@@ -4509,7 +4509,7 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2,
static
int ull2float(unsigned long long ull_value, float *f_value)
{
- hid_t dxpl_id = -1;
+ hid_t dxpl_id = H5I_INVALID_HID;
unsigned char *buf = NULL;
size_t src_size;
size_t dst_size;
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 5a85d79..4b3ea71 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -218,9 +218,9 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* close for next turn */
H5Aclose(attr1_id);
- attr1_id = -1;
+ attr1_id = H5I_INVALID_HID;
H5Aclose(attr2_id);
- attr2_id = -1;
+ attr2_id = H5I_INVALID_HID;
} /* end while */
/* list1 did not end */
@@ -244,7 +244,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* close for next turn */
H5Aclose(attr1_id);
- attr1_id = -1;
+ attr1_id = H5I_INVALID_HID;
}
/* list2 did not end */
@@ -267,7 +267,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* close for next turn */
H5Aclose(attr2_id);
- attr2_id = -1;
+ attr2_id = H5I_INVALID_HID;
}
/*------------------------------------------------------
@@ -336,7 +336,6 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const
hsize_t dims2[H5S_MAX_RANK]; /* dimensions of dataset */
char np1[512];
char np2[512];
- unsigned u; /* Local index variable */
hsize_t nfound = 0;
int j;
diff_err_t ret_value = opts->err_stat;
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 8a6eeeb..f757f92 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -34,10 +34,10 @@ hsize_t diff_dataset(hid_t file1_id,
diff_opt_t *opts)
{
int status = -1;
- hid_t did1 = -1;
- hid_t did2 = -1;
- hid_t dcpl1 = -1;
- hid_t dcpl2 = -1;
+ hid_t did1 = H5I_INVALID_HID;
+ hid_t did2 = H5I_INVALID_HID;
+ hid_t dcpl1 = H5I_INVALID_HID;
+ hid_t dcpl2 = H5I_INVALID_HID;
hsize_t nfound = 0;
diff_err_t ret_value = opts->err_stat;
@@ -814,8 +814,8 @@ int diff_can_type(hid_t f_tid1, /* file data type */
int nmembs1;
int nmembs2;
int j;
- hid_t memb_type1 = -1;
- hid_t memb_type2 = -1;
+ hid_t memb_type1 = H5I_INVALID_HID;
+ hid_t memb_type2 = H5I_INVALID_HID;
H5TOOLS_DEBUG("diff_can_type end - H5T_COMPOUND");
nmembs1 = H5Tget_nmembers(f_tid1);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 84b8eb8..c0868bf 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -24,11 +24,11 @@
/* global variables */
hid_t H5tools_ERR_STACK_g = 0;
-hid_t H5tools_ERR_CLS_g = -1;
-hid_t H5E_tools_g = -1;
-hid_t H5E_tools_min_id_g = -1;
-hid_t H5E_tools_min_info_id_g = -1;
-hid_t H5E_tools_min_dbg_id_g = -1;
+hid_t H5tools_ERR_CLS_g = H5I_INVALID_HID;
+hid_t H5E_tools_g = H5I_INVALID_HID;
+hid_t H5E_tools_min_id_g = H5I_INVALID_HID;
+hid_t H5E_tools_min_info_id_g = H5I_INVALID_HID;
+hid_t H5E_tools_min_dbg_id_g = H5I_INVALID_HID;
int compound_data;
FILE *rawattrstream = NULL; /* should initialize to stdout but gcc moans about it */
FILE *rawdatastream = NULL; /* should initialize to stdout but gcc moans about it */
@@ -430,7 +430,7 @@ h5tools_set_error_file(const char *fname, int is_bin)
static hid_t
h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
{
- hid_t new_fapl = -1; /* Copy of file access property list passed in, or new property list */
+ hid_t new_fapl = H5I_INVALID_HID; /* Copy of file access property list passed in, or new property list */
herr_t ret_value = SUCCEED;
/* Make a copy of the FAPL, for the file open call to use, eventually */
@@ -504,7 +504,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum)
done:
if((new_fapl != H5P_DEFAULT) && (ret_value < 0)) {
H5Pclose(new_fapl);
- new_fapl = -1;
+ new_fapl = H5I_INVALID_HID;
}
return(new_fapl);
@@ -1343,7 +1343,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
mem = ((unsigned char*)_mem) + block_index * size;
for (j = 0; j < nmembs; j++) {
- hid_t memb = -1;
+ hid_t memb = H5I_INVALID_HID;
size_t offset;
offset = H5Tget_member_offset(tid, j);
@@ -1363,7 +1363,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
{
int k, ndims;
hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts;
- hid_t memb = -1;
+ hid_t memb = H5I_INVALID_HID;
H5TOOLS_DEBUG("H5T_ARRAY");
/* get the array's base datatype for each element */
@@ -1397,7 +1397,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
case H5T_VLEN:
{
hsize_t nelmts;
- hid_t memb = -1;
+ hid_t memb = H5I_INVALID_HID;
H5TOOLS_DEBUG("H5T_VLEN");
/* get the VL sequences's base datatype for each element */
@@ -1480,8 +1480,6 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
break;
} /* end switch */
-done:
-
CATCH
H5TOOLS_ENDDEBUG("exit");
return ret_value;
@@ -1509,11 +1507,11 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
hsize_t total_size[H5S_MAX_RANK];
unsigned jndx;
size_t type_size;
- hid_t mem_space = -1;
+ hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
hbool_t past_catch = FALSE;
hsize_t blkndx;
- hid_t sid1 = -1;
+ hid_t sid1 = H5I_INVALID_HID;
int ret_value = -1;
/* Get the dataspace of the dataset */
@@ -1606,8 +1604,8 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id,
hsize_t *ptdata = NULL;
int sndims;
unsigned ndims;
- hid_t dtype = -1;
- hid_t type_id = -1;
+ hid_t dtype = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
@@ -1674,7 +1672,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id,
{
hsize_t *dims1 = NULL;
size_t type_size;
- hid_t mem_space = -1;
+ hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
int ret_value = 0;
@@ -1729,8 +1727,8 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id,
hsize_t npoints;
int sndims;
unsigned ndims;
- hid_t dtype = -1;
- hid_t type_id = -1;
+ hid_t dtype = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index cdc4581..f446444 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -504,8 +504,8 @@ h5tools_print_region_data_blocks(hid_t region_id,
unsigned jndx;
hbool_t past_catch = FALSE;
size_t type_size;
- hid_t mem_space = -1;
- hid_t sid1 = -1;
+ hid_t mem_space = H5I_INVALID_HID;
+ hid_t sid1 = H5I_INVALID_HID;
h5tools_context_t ctx;
void *region_buf = NULL;
int ret_value = 0;
@@ -2062,10 +2062,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_context_t *ctx, hid_t type, int object_search)
{
char *mname;
- hid_t mtype = -1;
- hid_t str_type = -1;
- hid_t super = -1;
- hid_t tmp_type = -1;
+ hid_t mtype = H5I_INVALID_HID;
+ hid_t str_type = H5I_INVALID_HID;
+ hid_t super = H5I_INVALID_HID;
+ hid_t tmp_type = H5I_INVALID_HID;
int snmembers;
int sndims;
unsigned nmembers;
@@ -2629,8 +2629,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
}
-done:
-
CATCH
H5TOOLS_ENDDEBUG("exit");
return ret_value;
@@ -2734,8 +2732,8 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
unsigned i;
unsigned nmembs = 0; /*number of members */
int snmembs;
- hid_t super = -1; /*enum base integer type */
- hid_t native = -1; /*native integer datatype */
+ hid_t super = H5I_INVALID_HID; /*enum base integer type */
+ hid_t native = H5I_INVALID_HID; /*native integer datatype */
H5T_sign_t sign_type; /*sign of value type */
size_t type_size; /*value type size */
size_t dst_size; /*destination value type size */
@@ -3074,7 +3072,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t
h5tools_context_t *ctx/*in,out*/, hid_t dcpl, hid_t type_id, hid_t obj_id)
{
size_t size;
- hid_t n_type = -1;
+ hid_t n_type = H5I_INVALID_HID;
void *buf = NULL;
n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT);
@@ -3309,7 +3307,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
if (vmaps) {
size_t next;
- ssize_t H5_ATTR_SANITY_CHECK ssize_out;
+ ssize_t H5_ATTR_NDEBUG_UNUSED ssize_out;
ctx->indent_level++;
for (next = 0; next < (unsigned) vmaps; next++) {
@@ -3776,8 +3774,8 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
error_msg("unable to open attribute \"%s\"\n", attr_name);
}
else {
- hid_t type = -1;
- hid_t space = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
ctx->indent_level++;
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 0aa5152..fddd6ab 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1133,7 +1133,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
break;
} /* end switch */
H5Oclose(obj);
- h5tools_str_sprint_reference(str, info, container, ref_vp);
+ h5tools_str_sprint_reference(str, ref_vp);
/* Print OID */
if(info->obj_hidefileno)
@@ -1145,7 +1145,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
case H5R_DATASET_REGION1:
H5TOOLS_DEBUG("ref_type is H5R_DATASET_REGION1");
h5tools_str_append(str, H5_TOOLS_DATASET);
- h5tools_str_sprint_reference(str, info, container, ref_vp);
+ h5tools_str_sprint_reference(str, ref_vp);
break;
case H5R_OBJECT2:
H5TOOLS_DEBUG("ref_type is H5R_OBJECT2");
@@ -1169,17 +1169,17 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, H5_TOOLS_UNKNOWN);
break;
} /* end switch */
- h5tools_str_sprint_reference(str, info, container, ref_vp);
+ h5tools_str_sprint_reference(str, ref_vp);
break;
case H5R_DATASET_REGION2:
H5TOOLS_DEBUG("ref_type is H5R_DATASET_REGION2");
h5tools_str_append(str, H5_TOOLS_DATASET);
- h5tools_str_sprint_reference(str, info, container, ref_vp);
+ h5tools_str_sprint_reference(str, ref_vp);
break;
case H5R_ATTR:
H5TOOLS_DEBUG("ref_type is H5R_ATTR");
h5tools_str_append(str, H5_TOOLS_ATTRIBUTE);
- h5tools_str_sprint_reference(str, info, container, ref_vp);
+ h5tools_str_sprint_reference(str, ref_vp);
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
@@ -1334,7 +1334,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
} /* end switch */
}
-done:
ret_value = h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
H5TOOLS_ENDDEBUG("exit with %s", ret_value);
@@ -1351,8 +1350,7 @@ done:
*-------------------------------------------------------------------------
*/
void
-h5tools_str_sprint_reference(h5tools_str_t *str, const h5tool_format_t *info,
- hid_t container, H5R_ref_t *ref_vp)
+h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *ref_vp)
{
ssize_t buf_size;
diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h
index 6fdf36a..02bfe40 100644
--- a/tools/lib/h5tools_str.h
+++ b/tools/lib/h5tools_str.h
@@ -41,7 +41,7 @@ H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_
H5TOOLS_DLL void h5tools_str_dump_space_slabs(h5tools_str_t *, hid_t, const h5tool_format_t *, h5tools_context_t *ctx);
H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
-H5TOOLS_DLL void h5tools_str_sprint_reference(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, H5R_ref_t *vp);
+H5TOOLS_DLL void h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *vp);
H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info,
hid_t container, hid_t type, void *vp,
h5tools_context_t *ctx);
diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c
index f63c228..22e4a39 100644
--- a/tools/lib/h5tools_type.c
+++ b/tools/lib/h5tools_type.c
@@ -26,7 +26,7 @@
hid_t
h5tools_get_little_endian_type(hid_t tid)
{
- hid_t p_type=-1;
+ hid_t p_type=H5I_INVALID_HID;
H5T_class_t type_class;
size_t size;
H5T_sign_t sign;
@@ -106,7 +106,7 @@ h5tools_get_little_endian_type(hid_t tid)
hid_t
h5tools_get_big_endian_type(hid_t tid)
{
- hid_t p_type = -1;
+ hid_t p_type = H5I_INVALID_HID;
H5T_class_t type_class;
size_t size;
H5T_sign_t sign;
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 1036199..323c9b3 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -721,7 +721,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
case H5O_TYPE_DATASET:
if(NULL == already_seen) {
- hid_t dset = -1;
+ hid_t dset = H5I_INVALID_HID;
/* Add the dataset to the list of objects */
add_obj(info->dset_table, oinfo->addr, name, TRUE);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 1ecd5c0..fb768a4 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -834,8 +834,8 @@ trav_attr(hid_t
#ifdef H5TRAV_PRINT_SPACE
}
else {
- hid_t attr = -1;
- hid_t space = -1;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hsize_t size[H5S_MAX_RANK];
int ndims;
int i;
diff --git a/tools/libtest/CMakeLists.txt b/tools/libtest/CMakeLists.txt
index f3d28da..5f53272 100644
--- a/tools/libtest/CMakeLists.txt
+++ b/tools/libtest/CMakeLists.txt
@@ -15,4 +15,6 @@ else ()
endif ()
set_target_properties (h5tools_test_utils PROPERTIES FOLDER tools)
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 120f803..726f4c4 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -1000,7 +1000,7 @@ test_set_configured_fapl(void)
* TEST-LOCAL VARIABLES *
************************/
- hid_t fapl_id = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
other_fa_t wrong_fa = {0x432, 0xf82, 0x9093};
H5FD_ros3_fapl_t ros3_anon_fa = {1, FALSE, "", "", ""};
H5FD_ros3_fapl_t ros3_auth_fa = {
@@ -1150,7 +1150,7 @@ test_set_configured_fapl(void)
int result;
testcase C = cases[i];
- fapl_id = -1;
+ fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
HDfprintf(stderr, "setup test %d\t%s\n", i, C.message); fflush(stderr);
@@ -1183,7 +1183,7 @@ test_set_configured_fapl(void)
if (fapl_id > 0) {
FAIL_IF( FAIL == H5Pclose(fapl_id) )
}
- fapl_id = -1;
+ fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
HDfprintf(stderr, "after cleanup\n"); fflush(stderr);
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 86bd6f6..e1370e2 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -211,8 +211,8 @@ main (int argc, const char *argv[])
H5E_auto2_t tools_func;
void *edata;
void *tools_edata;
- hid_t fid_src = -1;
- hid_t fid_dst = -1;
+ hid_t fid_src = H5I_INVALID_HID;
+ hid_t fid_dst = H5I_INVALID_HID;
unsigned flag = 0;
unsigned verbose = 0;
unsigned parents = 0;
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 380ab3b..5ba5fb3 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -126,7 +126,8 @@ int main(int argc, const char *argv[])
static void
ph5diff_worker(int nID)
{
- hid_t file1_id = -1, file2_id = -1;
+ hid_t file1_id = H5I_INVALID_HID;
+ hid_t file2_id = H5I_INVALID_HID;
while(1)
{
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 0222c8b..731fcd7 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1393,8 +1393,8 @@ error:
int
main(int argc, const char *argv[])
{
- hid_t fid = -1;
- hid_t gid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
hid_t fapl_id = H5P_DEFAULT;
H5E_auto2_t func;
H5E_auto2_t tools_func;
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index bc426f2..2eb11fd 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -614,7 +614,7 @@ dump_named_datatype(hid_t tid, const char *name)
{
H5O_info_t oinfo;
unsigned attr_crt_order_flags;
- hid_t tcpl_id = -1; /* datatype creation property list ID */
+ hid_t tcpl_id = H5I_INVALID_HID; /* datatype creation property list ID */
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
@@ -1415,7 +1415,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data)
void
handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
{
- hid_t gid = -1;
+ hid_t gid = H5I_INVALID_HID;
if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) {
error_msg("unable to open root group\n");
@@ -1469,8 +1469,8 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
void
handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
{
- hid_t oid = -1;
- hid_t attr_id = -1;
+ hid_t oid = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char *obj_name = NULL;
char *attr_name = NULL;
int j;
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index b63e68d..9340e44 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -1783,15 +1783,10 @@ xml_dump_dataspace(hid_t space)
void
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, int H5_ATTR_UNUSED pindex)
{
- hid_t space = -1;
- hid_t type = -1;
- hid_t p_type = -1;
- hsize_t size[64];
- hsize_t nelmts = 1;
- int ndims;
- int i;
+ hid_t space = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t p_type = H5I_INVALID_HID;
int status = -1;
- void *buf = NULL;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
@@ -1950,9 +1945,9 @@ herr_t
xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *info,
void H5_ATTR_UNUSED * op_data)
{
- hid_t attr_id = -1;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
H5S_class_t space_type;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
@@ -2787,8 +2782,8 @@ static int
xml_print_refs(hid_t did, int source)
{
herr_t e;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
hsize_t i;
size_t tsiz;
@@ -2936,8 +2931,8 @@ static int
xml_print_strs(hid_t did, int source)
{
herr_t e;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
htri_t is_vlstr = FALSE;
size_t tsiz = 0;
@@ -4121,7 +4116,7 @@ xml_print_enum(hid_t type)
unsigned char *value = NULL; /*value array */
unsigned nmembs; /*number of members */
hid_t super; /*enum base integer type */
- hid_t native = -1; /*native integer datatype */
+ hid_t native = H5I_INVALID_HID; /*native integer datatype */
size_t dst_size; /*destination value type size */
unsigned i; /*miscellaneous counters */
size_t j;
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 257a047..f5234f4 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -219,8 +219,8 @@ leave(int ret)
static int
convert(hid_t fid, const char *dname)
{
- hid_t dcpl = -1;
- hid_t did = -1;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
H5D_layout_t layout_type;
H5D_chunk_index_t idx_type;
@@ -399,7 +399,7 @@ main(int argc, const char *argv[])
{
H5E_auto2_t func;
void *edata;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index bd1689f..81f9a32 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -1086,12 +1086,12 @@ out:
*/
static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
{
- hid_t group_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t mspace_id = -1;
- hid_t type_id = -1;
- hid_t handle = -1;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t mspace_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t handle = H5I_INVALID_HID;
char *str1 = NULL;
char *str2 = NULL;
char *str3 = NULL;
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 8222e06..07797c8 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -197,8 +197,8 @@ main (int argc, const char *argv[])
int ofid = -1;
void *edata;
H5E_auto2_t func;
- hid_t ifile = -1;
- hid_t plist = -1;
+ hid_t ifile = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
herr_t status;
htri_t testval;
hsize_t usize;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index aa893f9..203522b 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -199,8 +199,8 @@ main(int argc, const char *argv[])
{
void *edata;
H5E_auto2_t func;
- hid_t ifile = -1;
- hid_t plist = -1;
+ hid_t ifile = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
off_t fsize;
hsize_t usize;
htri_t testval;
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 03e7bed..a926e0c 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -879,7 +879,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
if (nmembs > 0) {
char **name; /* member names */
unsigned char *value; /* value array */
- hid_t native = -1; /* native integer data type */
+ hid_t native = H5I_INVALID_HID; /* native integer data type */
size_t dst_size; /* destination value type size */
unsigned i; /* miscellaneous counters */
@@ -1688,7 +1688,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
-dump_attribute_values(hid_t attr, const char *attr_name)
+dump_attribute_values(hid_t attr)
{
hid_t f_type = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
@@ -1948,7 +1948,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_str_close(&buffer);
if (data_g)
- dump_attribute_values(attr, attr_name);
+ dump_attribute_values(attr);
H5Aclose(attr);
}
else {
@@ -2821,7 +2821,7 @@ leave(int ret)
int
main(int argc, const char *argv[])
{
- hid_t file = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
char *fname = NULL, *oname = NULL, *x;
const char *s = NULL;
char *rest;
@@ -3286,17 +3286,17 @@ main(int argc, const char *argv[])
fname = HDstrdup(argv[argno++]);
oname = NULL;
- file = -1;
+ file_id = H5I_INVALID_HID;
while (fname && *fname) {
if (fapl_id != H5P_DEFAULT) {
- file = H5Fopen(fname, H5F_ACC_RDONLY, fapl_id);
+ file_id = H5Fopen(fname, H5F_ACC_RDONLY, fapl_id);
}
else {
- file = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, preferred_driver, drivername, sizeof drivername);
+ file_id = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, preferred_driver, drivername, sizeof drivername);
}
- if (file >= 0) {
+ if (file_id >= 0) {
if (verbose_g)
PRINTSTREAM(rawoutstream, "Opened \"%s\" with %s driver.\n", fname, drivername);
break; /*success*/
@@ -3312,7 +3312,7 @@ main(int argc, const char *argv[])
*oname = '\0';
} /* end while */
- if (file < 0) {
+ if (file_id < 0) {
HDfprintf(rawerrorstream, "%s: unable to open file\n", argv[argno-1]);
HDfree(fname);
err_exit = 1;
@@ -3347,8 +3347,8 @@ main(int argc, const char *argv[])
/* Remember the file information for later */
iter.fname = fname;
- iter.fid = file;
- iter.gid = -1;
+ iter.fid = file_id;
+ iter.gid = H5I_INVALID_HID;
iter.symlink_target = FALSE;
iter.symlink_list = &symlink_list;
iter.symlink_list->dangle_link = FALSE;
@@ -3360,7 +3360,7 @@ main(int argc, const char *argv[])
/* Check for root group as object name */
if (HDstrcmp(oname, root_name)) {
/* Check the type of link given */
- if (H5Lget_info(file, oname, &li, H5P_DEFAULT) < 0) {
+ if (H5Lget_info(file_id, oname, &li, H5P_DEFAULT) < 0) {
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
@@ -3381,18 +3381,18 @@ main(int argc, const char *argv[])
/* Open the object and display it's information */
if (li.type == H5L_TYPE_HARD) {
- if (visit_obj(file, oname, &iter) < 0) {
+ if (visit_obj(file_id, oname, &iter) < 0) {
H5Eset_auto2(H5E_DEFAULT, func, edata);
leave(EXIT_FAILURE);
}
} /* end if(li.type == H5L_TYPE_HARD) */
else {
/* Specified name is not for object -- list that link */
- /* Use file ID for root group ID */
- iter.gid = file;
+ /* Use file_id ID for root group ID */
+ iter.gid = file_id;
list_lnk(oname, &li, &iter);
}
- H5Fclose(file);
+ H5Fclose(file_id);
HDfree(fname);
if (x)
HDfree(oname);
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index 6f0e4eb..b138896 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -250,7 +250,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
/* Update the address and id */
dt->addr_in = travt->objs[i].objno;
- dt->id_out = -1;
+ dt->id_out = H5I_INVALID_HID;
/* Check if this type is the one requested */
if (oinfo.addr == dt->addr_in) {
@@ -272,7 +272,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
/* Update the address and id */
dt_ret->addr_in = oinfo.addr;
- dt_ret->id_out = -1;
+ dt_ret->id_out = H5I_INVALID_HID;
} /* end if requested datatype not found */
/* If the requested datatype does not yet exist in the output file, copy it
@@ -343,11 +343,11 @@ done:
int
copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options)
{
- hid_t attr_id = -1; /* attr ID */
- hid_t attr_out = -1; /* attr ID */
- hid_t space_id = -1; /* space ID */
- hid_t ftype_id = -1; /* file type ID */
- hid_t wtype_id = -1; /* read/write type ID */
+ hid_t attr_id = H5I_INVALID_HID; /* attr ID */
+ hid_t attr_out = H5I_INVALID_HID; /* attr ID */
+ hid_t space_id = H5I_INVALID_HID; /* space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file type ID */
+ hid_t wtype_id = H5I_INVALID_HID; /* read/write type ID */
size_t msize; /* size of type */
void *buf = NULL; /* data buffer */
hsize_t nelmts; /* number of elements in dataset */
@@ -385,7 +385,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
if ((is_named = H5Tcommitted(ftype_id)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tcommitted failed");
if (is_named && travt) {
- hid_t fidout = -1;
+ hid_t fidout = H5I_INVALID_HID;
/* Create out file id */
if ((fidout = H5Iget_file_id(loc_out)) < 0)
@@ -432,7 +432,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
type_class = H5Tget_class(wtype_id);
is_ref = (type_class == H5T_REFERENCE);
if (type_class == H5T_VLEN || type_class == H5T_ARRAY) {
- hid_t base_type = -1;
+ hid_t base_type = H5I_INVALID_HID;
base_type = H5Tget_super(ftype_id);
is_ref = (is_ref || (H5Tget_class(base_type) == H5T_REFERENCE));
@@ -500,16 +500,16 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*/
if (H5Sclose(space_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sclose failed");
- space_id = -1;
+ space_id = H5I_INVALID_HID;
if (H5Tclose(wtype_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
- wtype_id = -1;
+ wtype_id = H5I_INVALID_HID;
if (H5Tclose(ftype_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
- ftype_id = -1;
+ ftype_id = H5I_INVALID_HID;
if (H5Aclose(attr_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Aclose failed");
- attr_id = -1;
+ attr_id = H5I_INVALID_HID;
} /* for u (each attribute) */
done:
@@ -725,9 +725,9 @@ done:
static int
check_objects(const char* fname, pack_opt_t *options)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
unsigned int i;
int ifil;
trav_table_t *travt = NULL;
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 613606f..7336125 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -61,11 +61,11 @@ static void print_user_block(const char *filename, hid_t fid);
int
copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options)
{
- hid_t fidin = -1;
- hid_t fidout = -1;
- hid_t fcpl_in = -1; /* file creation property list ID for input file */
- hid_t grp_in = -1; /* group ID */
- hid_t gcpl_in = -1; /* group creation property list */
+ hid_t fidin = H5I_INVALID_HID;
+ hid_t fidout = H5I_INVALID_HID;
+ hid_t fcpl_in = H5I_INVALID_HID; /* file creation property list ID for input file */
+ hid_t grp_in = H5I_INVALID_HID; /* group ID */
+ hid_t gcpl_in = H5I_INVALID_HID; /* group creation property list */
hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */
hid_t fapl = H5P_DEFAULT; /* file access property list ID */
trav_table_t *travt = NULL;
@@ -580,19 +580,19 @@ int
do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
- hid_t grp_in = -1; /* group ID */
- hid_t grp_out = -1; /* group ID */
- hid_t dset_in = -1; /* read dataset ID */
- hid_t dset_out = -1; /* write dataset ID */
- hid_t gcpl_in = -1; /* group creation property list */
- hid_t gcpl_out = -1; /* group creation property list */
- hid_t type_in = -1; /* named type ID */
- hid_t type_out = -1; /* named type ID */
- hid_t dcpl_in = -1; /* dataset creation property list ID */
- hid_t dcpl_out = -1; /* dataset creation property list ID */
- hid_t f_space_id = -1; /* file space ID */
- hid_t ftype_id = -1; /* file type ID */
- hid_t wtype_id = -1; /* read/write type ID */
+ hid_t grp_in = H5I_INVALID_HID; /* group ID */
+ hid_t grp_out = H5I_INVALID_HID; /* group ID */
+ hid_t dset_in = H5I_INVALID_HID; /* read dataset ID */
+ hid_t dset_out = H5I_INVALID_HID; /* write dataset ID */
+ hid_t gcpl_in = H5I_INVALID_HID; /* group creation property list */
+ hid_t gcpl_out = H5I_INVALID_HID; /* group creation property list */
+ hid_t type_in = H5I_INVALID_HID; /* named type ID */
+ hid_t type_out = H5I_INVALID_HID; /* named type ID */
+ hid_t dcpl_in = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl_out = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t f_space_id = H5I_INVALID_HID; /* file space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file type ID */
+ hid_t wtype_id = H5I_INVALID_HID; /* read/write type ID */
named_dt_t *named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */
size_t msize; /* size of type */
hsize_t nelmts; /* number of elements in dataset */
@@ -946,7 +946,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
hsize_t zero[8]; /*vector of zeros */
int k;
H5D_layout_t dset_layout;
- hid_t dcpl_tmp = -1; /* dataset creation property list ID */
+ hid_t dcpl_tmp = H5I_INVALID_HID; /* dataset creation property list ID */
/* check if we have VL data in the dataset's datatype */
if (H5Tdetect_class(wtype_id, H5T_VLEN) == TRUE)
@@ -1095,7 +1095,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
*-------------------------------------------------------------------------
*/
else {
- hid_t pid = -1;
+ hid_t pid = H5I_INVALID_HID;
/* create property to pass copy options */
if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0)
@@ -1167,7 +1167,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
if (H5Tclose(type_out) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
- type_out = -1; /* named datatypes stack, named_dt_head, manages allocation */
+ type_out = H5I_INVALID_HID; /* named datatypes stack, named_dt_head, manages allocation */
break;
@@ -1429,7 +1429,7 @@ print_user_block(const char *filename, hid_t fid)
int fh = -1; /* file handle */
hsize_t ub_size; /* user block size */
hsize_t size; /* size read */
- hid_t fcpl = -1; /* file creation property list ID for HDF5 file */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list ID for HDF5 file */
int i;
int ret_value = 0;
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index a7fbd3a..70204c8 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -42,15 +42,15 @@ int do_copy_refobjs(hid_t fidin,
trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
- hid_t grp_in = -1; /* read group ID */
- hid_t grp_out = -1; /* write group ID */
- hid_t dset_in = -1; /* read dataset ID */
- hid_t dset_out = -1; /* write dataset ID */
- hid_t type_in = -1; /* named type ID */
- hid_t dcpl_id = -1; /* dataset creation property list ID */
- hid_t space_id = -1; /* space ID */
- hid_t ftype_id = -1; /* file data type ID */
- hid_t mtype_id = -1; /* memory data type ID */
+ hid_t grp_in = H5I_INVALID_HID; /* read group ID */
+ hid_t grp_out = H5I_INVALID_HID; /* write group ID */
+ hid_t dset_in = H5I_INVALID_HID; /* read dataset ID */
+ hid_t dset_out = H5I_INVALID_HID; /* write dataset ID */
+ hid_t type_in = H5I_INVALID_HID; /* named type ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t space_id = H5I_INVALID_HID; /* space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file data type ID */
+ hid_t mtype_id = H5I_INVALID_HID; /* memory data type ID */
size_t msize; /* memory size of memory type */
hsize_t nelmts; /* number of elements in dataset */
int rank; /* rank of dataset */
@@ -145,7 +145,7 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
if(H5Tequal(mtype_id, H5T_STD_REF_OBJ)) {
- hid_t refobj_id = -1;
+ hid_t refobj_id = H5I_INVALID_HID;
hobj_ref_t *refbuf = NULL; /* buffer for object references */
hobj_ref_t *buf = NULL;
const char* refname;
@@ -221,7 +221,7 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) {
- hid_t refobj_id = -1;
+ hid_t refobj_id = H5I_INVALID_HID;
hdset_reg_ref_t *refbuf = NULL; /* input buffer for region references */
hdset_reg_ref_t *buf = NULL; /* output buffer */
const char* refname;
@@ -260,7 +260,7 @@ int do_copy_refobjs(hid_t fidin,
* in the second traversal of the file
*/
if((refname = MapIdToName(refobj_id, travt)) != NULL) {
- hid_t region_id = -1; /* region id of the referenced dataset */
+ hid_t region_id = H5I_INVALID_HID; /* region id of the referenced dataset */
if((region_id = H5Rget_region(dset_in, H5R_DATASET_REGION, &buf[u])) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Rget_region failed");
@@ -430,11 +430,11 @@ static int copy_refs_attr(hid_t loc_in,
trav_table_t *travt,
hid_t fidout) /* for saving references */
{
- hid_t attr_id = -1; /* attr ID */
- hid_t attr_out = -1; /* attr ID */
- hid_t space_id = -1; /* space ID */
- hid_t ftype_id = -1; /* file data type ID */
- hid_t mtype_id = -1; /* memory data type ID */
+ hid_t attr_id = H5I_INVALID_HID; /* attr ID */
+ hid_t attr_out = H5I_INVALID_HID; /* attr ID */
+ hid_t space_id = H5I_INVALID_HID; /* space ID */
+ hid_t ftype_id = H5I_INVALID_HID; /* file data type ID */
+ hid_t mtype_id = H5I_INVALID_HID; /* memory data type ID */
size_t msize; /* memory size of type */
hsize_t nelmts; /* number of elements in dataset */
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
@@ -823,8 +823,8 @@ static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in,
hid_t fid_out, void *ref_out, trav_table_t *travt)
{
const char *ref_obj_name;
- hid_t space_id = -1;
- hid_t ref_obj_id = -1;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t ref_obj_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
ref_obj_id = H5Rdereference2(obj_id, H5P_DEFAULT, ref_type, ref_in);
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index d84766a..84cbf60 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -39,17 +39,17 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil
int
h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options)
{
- hid_t fidin = -1; /* file ID for input file*/
- hid_t fidout = -1; /* file ID for output file*/
- hid_t did = -1; /* dataset ID */
- hid_t pid = -1; /* dataset creation property list ID */
- hid_t sid = -1; /* space ID */
- hid_t tid = -1; /* type ID */
+ hid_t fidin = H5I_INVALID_HID; /* file ID for input file*/
+ hid_t fidout = H5I_INVALID_HID; /* file ID for output file*/
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t pid = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t sid = H5I_INVALID_HID; /* space ID */
+ hid_t tid = H5I_INVALID_HID; /* type ID */
int ok = 1; /* step results */
unsigned int i;
trav_table_t *travt = NULL;
- hid_t fcpl_in = -1; /* file creation property for input file */
- hid_t fcpl_out = -1; /* file creation property for output file */
+ hid_t fcpl_in = H5I_INVALID_HID; /* file creation property for input file */
+ hid_t fcpl_out = H5I_INVALID_HID; /* file creation property for output file */
H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */
hbool_t in_persist, out_persist; /* free-space persist status for in/output file */
hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */
@@ -355,14 +355,14 @@ int verify_layout(hid_t pid, pack_info_t *obj)
int h5repack_cmp_pl(const char *fname1, const char *fname2)
{
- hid_t fid1 =-1; /* file ID */
- hid_t fid2 =-1; /* file ID */
- hid_t dset1 =-1; /* dataset ID */
- hid_t dset2 =-1; /* dataset ID */
- hid_t gid =-1; /* group ID */
- hid_t dcpl1 =-1; /* dataset creation property list ID */
- hid_t dcpl2 =-1; /* dataset creation property list ID */
- hid_t gcplid =-1; /* group creation property list */
+ hid_t fid1 =H5I_INVALID_HID; /* file ID */
+ hid_t fid2 =H5I_INVALID_HID; /* file ID */
+ hid_t dset1 =H5I_INVALID_HID; /* dataset ID */
+ hid_t dset2 =H5I_INVALID_HID; /* dataset ID */
+ hid_t gid =H5I_INVALID_HID; /* group ID */
+ hid_t dcpl1 =H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t dcpl2 =H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t gcplid =H5I_INVALID_HID; /* group creation property list */
unsigned crt_order_flag1; /* group creation order flag */
unsigned crt_order_flag2; /* group creation order flag */
trav_table_t *trav = NULL;
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 9ce7327..f160671 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1853,7 +1853,7 @@ main(int argc, const char *argv[])
{
iter_t iter;
const char *fname = NULL;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
H5E_auto2_t func;
H5E_auto2_t tools_func;
void *edata;
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index ae57031..927167b 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -252,8 +252,8 @@ int
main (int argc, const char *argv[])
{
char *fname = NULL; /* File name */
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
haddr_t image_addr;
hsize_t image_len;
unsigned flags = H5F_ACC_RDWR; /* file access flags */
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index 1130ea7..028935f 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -43,4 +43,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index a3acdae..716b0d2 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -338,14 +338,14 @@ static void gent_att_compound_vlstr(hid_t loc_id)
const char *v;
} s1;
hsize_t dim[1] = {1}; /* Dimension size */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t vl_str_tid = -1; /* Variable length datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hid_t null_sid = -1; /* Null dataspace ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t vl_str_tid = H5I_INVALID_HID; /* Variable length datatype ID */
+ hid_t cmpd_tid = H5I_INVALID_HID; /* Compound datatype ID */
+ hid_t null_sid = H5I_INVALID_HID; /* Null dataspace ID */
s1 buf; /* Buffer */
buf.i = 9;
@@ -725,7 +725,7 @@ out:
*------------------------------------------------------------------------*/
static void Test_Obj_Copy(void)
{
- hid_t fid = -1; /* File id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
hid_t fapl_new = (-1); /* File access property id */
unsigned new_format; /* New format or old format */
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index cb4397f..82e09c6 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -43,4 +43,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 347f796..88ed62c 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -376,35 +376,37 @@
##############################################################################
macro (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${ARGN})
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (${resultcode})
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif ()
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DIFF-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.txt"
- -D "TEST_APPEND=EXIT CODE:"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ if (HDF5_TEST_SERIAL)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${ARGN})
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (${resultcode})
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (last_test)
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else ()
+ add_test (
+ NAME H5DIFF-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -D "TEST_APPEND=EXIT CODE:"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ if (last_test)
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
endif ()
endif ()
- if (H5_HAVE_PARALLEL)
+ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
endif ()
endmacro ()
@@ -1547,7 +1549,7 @@ ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2})
##############################################################################
### P L U G I N T E S T S
##############################################################################
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND HDF5_TEST_SERIAL)
ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5)
ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5)
endif ()
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 95f98fd..98001ff 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -303,8 +303,8 @@ int main(void)
static
int test_basic(const char *fname1, const char *fname2, const char *fname3)
{
- hid_t fid1 = -1, fid2 = -1;
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
hsize_t dims1[1] = { 6 };
hsize_t dims2[2] = { 3, 2 };
@@ -662,11 +662,11 @@ out:
static
int test_types(const char *fname)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t tid1 = -1;
- hid_t tid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t tid1 = H5I_INVALID_HID;
+ hid_t tid2 = H5I_INVALID_HID;
herr_t status;
hsize_t dims[1] = { 1 };
typedef struct s1_t {
@@ -787,8 +787,8 @@ int test_types(const char *fname)
static
int test_datatypes(const char *fname)
{
- hid_t fid1 = -1;
- hid_t dset = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
hsize_t dims[2] = { 3, 2 };
herr_t status;
char buf1a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } };
@@ -977,11 +977,11 @@ int test_datatypes(const char *fname)
static
int test_attributes(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t gid = -1;
- hid_t root_id = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t root_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = { 2 };
herr_t status;
@@ -1039,14 +1039,14 @@ int test_attributes(const char *file, int make_diffs /* flag to modify data buff
static int test_attributes_verbose_level(const char *fname1, const char *fname2)
{
herr_t status = SUCCEED;
- hid_t fid1 = -1, fid2 = -1;
- hid_t f1_gid = -1, f2_gid = -1;
- hid_t f1_gid2 = -1, f2_gid2 = -1;
- hid_t f1_gid3 = -1, f2_gid3 = -1;
- hid_t f1_gid4 = -1, f2_gid4 = -1;
- hid_t f1_did = -1, f2_did = -1;
- hid_t f1_sid = -1, f2_sid = -1;
- hid_t f1_tid = -1, f2_tid = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hid_t f1_gid = H5I_INVALID_HID, f2_gid = H5I_INVALID_HID;
+ hid_t f1_gid2 = H5I_INVALID_HID, f2_gid2 = H5I_INVALID_HID;
+ hid_t f1_gid3 = H5I_INVALID_HID, f2_gid3 = H5I_INVALID_HID;
+ hid_t f1_gid4 = H5I_INVALID_HID, f2_gid4 = H5I_INVALID_HID;
+ hid_t f1_did = H5I_INVALID_HID, f2_did = H5I_INVALID_HID;
+ hid_t f1_sid = H5I_INVALID_HID, f2_sid = H5I_INVALID_HID;
+ hid_t f1_tid = H5I_INVALID_HID, f2_tid = H5I_INVALID_HID;
/* dset */
hsize_t dset_dims[1] = { 3 };
int dset_data[3] = { 0, 1, 2 };
@@ -1304,10 +1304,10 @@ out:
static
int test_datasets(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t gid = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = { 2 };
herr_t status;
int buf[2] = { 1, 2 };
@@ -1357,10 +1357,10 @@ int test_datasets(const char *file, int make_diffs /* flag to modify data buffer
static
int test_special_datasets(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid0 = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid0 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims0[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 };
hsize_t dims[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 };
herr_t status;
@@ -1413,9 +1413,9 @@ int test_special_datasets(const char *file, int make_diffs /* flag to modify dat
*-------------------------------------------------------------------------*/
static int test_link_name(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
herr_t status = SUCCEED;
/*-----------------------------------------------------------------------
@@ -1486,8 +1486,8 @@ out:
*-------------------------------------------------------------------------*/
static int test_soft_links(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1605,10 +1605,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_linked_softlinks(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t gid3 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1786,10 +1786,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_external_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1931,9 +1931,9 @@ out:
*-------------------------------------------------------------------------*/
static int test_ext2soft_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -2060,12 +2060,12 @@ out:
static
int gen_dataset_idx(const char *file, int format)
{
- hid_t fid = -1; /* file id */
- hid_t did = -1;
- hid_t did2 = -1; /* dataset id */
- hid_t sid = -1; /* space id */
- hid_t fapl = -1; /* file access property id */
- hid_t dcpl = -1; /* dataset creation property id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t did = H5I_INVALID_HID;
+ hid_t did2 = H5I_INVALID_HID; /* dataset id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
hsize_t dims[1] = { 10 }; /* dataset dimension */
hsize_t c_dims[1] = { 2 }; /* chunk dimension */
herr_t status; /* return status */
@@ -2146,8 +2146,8 @@ int gen_dataset_idx(const char *file, int format)
*-------------------------------------------------------------------------*/
static int test_dangle_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -2346,10 +2346,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_group_recurse(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1_f1 = -1, gid2_f1 = -1, gid3_f1 = -1, gid10_f1 = -1;
- hid_t gid1_f2 = -1, gid2_f2 = -1, gid3_f2 = -1, gid11_f2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1_f1 = H5I_INVALID_HID, gid2_f1 = H5I_INVALID_HID, gid3_f1 = H5I_INVALID_HID, gid10_f1 = H5I_INVALID_HID;
+ hid_t gid1_f2 = H5I_INVALID_HID, gid2_f2 = H5I_INVALID_HID, gid3_f2 = H5I_INVALID_HID, gid11_f2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 0, 1 }, { 1, 0 }, { 1, 0 } };
int data2[4][2] = { { 0, 2 }, { 0, 2 }, { 2, 0 }, { 2, 0 } };
@@ -2758,18 +2758,18 @@ out:
#define GRP_R_DSETNAME2 "dset2"
static int test_group_recurse2(void)
{
- hid_t fileid1 = -1;
- hid_t grp1 = -1;
- hid_t grp2 = -1;
- hid_t grp3 = -1;
- hid_t grp4 = -1;
- hid_t dset1 = -1;
- hid_t dset2 = -1;
- hid_t datatype = -1;
- hid_t dataspace = -1;
- hid_t fileid2 = -1;
- hid_t fileid3 = -1;
- hid_t fileid4 = -1;
+ hid_t fileid1 = H5I_INVALID_HID;
+ hid_t grp1 = H5I_INVALID_HID;
+ hid_t grp2 = H5I_INVALID_HID;
+ hid_t grp3 = H5I_INVALID_HID;
+ hid_t grp4 = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID;
+ hid_t dset2 = H5I_INVALID_HID;
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dataspace = H5I_INVALID_HID;
+ hid_t fileid2 = H5I_INVALID_HID;
+ hid_t fileid3 = H5I_INVALID_HID;
+ hid_t fileid4 = H5I_INVALID_HID;
hsize_t dimsf[2]; /* dataset dimensions */
herr_t status = 0;
int data1[4][2] = { { 0, 0 }, { 1, 1 }, { 2, 2 }, { 3, 3 } };
@@ -3069,10 +3069,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj1(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
@@ -3189,11 +3189,11 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj2(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t gid3 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
@@ -3320,9 +3320,9 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj3(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
herr_t status = SUCCEED;
@@ -3416,8 +3416,8 @@ out:
static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new)
{
int i;
- hid_t fid1 = -1; /* file id */
- hid_t gid = -1;
+ hid_t fid1 = H5I_INVALID_HID; /* file id */
+ hid_t gid = H5I_INVALID_HID;
/* compound1 datatype */
typedef struct comp1_t {
@@ -3534,21 +3534,21 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
} comp9_t;
/* vlen string */
- hid_t sid_vlen_str = -1; /* dataspace ID */
- hid_t tid_vlen_str = -1; /* datatype ID */
+ hid_t sid_vlen_str = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_vlen_str = H5I_INVALID_HID; /* datatype ID */
char vlen_str_buf[] = { "Variable length string" };
hsize_t dims_vlen_str[] = { VLEN_STR_DIM };
/* fixlen string */
- hid_t sid_fixlen_str = -1; /* dataspace ID */
- hid_t tid_fixlen_str = -1; /* datatype ID */
+ hid_t sid_fixlen_str = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_fixlen_str = H5I_INVALID_HID; /* datatype ID */
const char fixlen_str_buf[FIXLEN_STR_SIZE] = { "Fixed length string" };
hsize_t dims_fixlen_str[] = { FIXLEN_STR_DIM };
/* vlen string array */
- hid_t sid_vlen_str_array = -1; /* dataspace ID */
- hid_t tid_vlen_str_array_pre = -1; /* datatype ID */
- hid_t tid_vlen_str_array = -1; /* datatype ID */
+ hid_t sid_vlen_str_array = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_vlen_str_array_pre = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid_vlen_str_array = H5I_INVALID_HID; /* datatype ID */
const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM] =
{ "1 - Variable length string Array",
"2 - Testing variable length string array in compound type",
@@ -3556,9 +3556,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
hsize_t dims_vlen_str_array[] = { VLEN_STR_ARRY_DIM };
/* fixlen string array */
- hid_t sid_fixlen_str_array = -1; /* dataspace ID */
- hid_t tid_fixlen_str_array_pre = -1; /* datatype ID */
- hid_t tid_fixlen_str_array = -1; /* datatype ID */
+ hid_t sid_fixlen_str_array = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_fixlen_str_array_pre = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid_fixlen_str_array = H5I_INVALID_HID; /* datatype ID */
const char *fixlen_str_array_buf[FIXLEN_STR_ARRY_DIM] = {
"1 - Fixed length string Array", "2 - Fixed length string Array",
"3 - Fixed length string Array" };
@@ -3567,17 +3567,17 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
/*------------------------------------------
* compound dataset
*------------------------------------------*/
- hid_t sid_comp = -1; /* dataspace ID */
- hid_t tid1_comp = -1; /* datatype ID */
- hid_t tid2_comp = -1; /* datatype ID */
- hid_t tid3_comp = -1; /* datatype ID */
- hid_t tid4_comp = -1; /* datatype ID */
- hid_t tid5_comp = -1; /* datatype ID */
- hid_t tid6_comp = -1; /* datatype ID */
- hid_t tid7_comp = -1; /* datatype ID */
- hid_t tid8_comp = -1; /* datatype ID */
- hid_t tid9_comp = -1; /* datatype ID */
- hid_t did_comp = -1; /* dataset ID */
+ hid_t sid_comp = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid1_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid2_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid3_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid4_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid5_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid6_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid7_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid8_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid9_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t did_comp = H5I_INVALID_HID; /* dataset ID */
hsize_t dims_comp[] = { COMP_DIM };
herr_t status = SUCCEED;
@@ -4020,7 +4020,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
}
H5Dclose(did_comp);
- did_comp = -1;
+ did_comp = H5I_INVALID_HID;
out:
/*-----------------------------------------------------------------------
@@ -4091,9 +4091,9 @@ out:
static int test_enums(const char *fname)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
- hid_t tid = -1;
+ hid_t tid = H5I_INVALID_HID;
int enum_val = -1;
/* The data in the two arrays cover the following cases:
@@ -4217,17 +4217,17 @@ static void test_comps_array(const char *fname, const char *dset, const char *at
cmpd1_t wdata[SDIM_DSET]; /* dataset with compound1 */
- hid_t fid = -1; /* HDF5 File IDs */
- hid_t did_dset = -1; /* Dataset ID */
- hid_t sid_dset = -1; /* Dataset space ID */
- hid_t tid_cmpd1 = -1; /* Compound1 type ID */
- hid_t tid_arry1 = -1; /* Array type ID in compound1 */
- hid_t tid_cmpd2 = -1; /* Compound2 type ID */
- hid_t tid_attr = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File IDs */
+ hid_t did_dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* Dataset space ID */
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* Compound1 type ID */
+ hid_t tid_arry1 = H5I_INVALID_HID; /* Array type ID in compound1 */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* Compound2 type ID */
+ hid_t tid_attr = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
int i, j;
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4326,17 +4326,17 @@ static void test_comps_vlen(const char * fname, const char *dset, const char *at
cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
- hid_t fid = -1; /* HDF5 File ID */
- hid_t did_dset = -1; /* dataset ID */
- hid_t sid_dset = -1; /* dataset space ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd2 = -1; /* compound2 type ID */
- hid_t tid_cmpd1 = -1; /* compound1 type ID */
- hid_t tid_cmpd1_vlen = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
unsigned i, j; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4442,19 +4442,19 @@ static void test_comps_array_vlen(const char * fname, const char *dset, const ch
} cmpd1_t;
cmpd1_t wdata[SDIM_DSET]; /* Information to write */
- hid_t fid = -1; /* HDF5 File IDs */
- hid_t did_dset = -1; /* Dataset ID */
- hid_t sid_dset = -1; /* Dataspace ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd1 = -1; /* Compound1 Datatype ID */
- hid_t tid_arry1 = -1; /* Array Datatype ID */
- hid_t tid_cmpd2 = -1; /* Compound2 Datatype ID */
- hid_t tid_cmpd2_vlen = -1;
- hid_t tid_cmpd3 = -1; /* Compound3 Datatype ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File IDs */
+ hid_t did_dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* Compound1 Datatype ID */
+ hid_t tid_arry1 = H5I_INVALID_HID; /* Array Datatype ID */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* Compound2 Datatype ID */
+ hid_t tid_cmpd2_vlen = H5I_INVALID_HID;
+ hid_t tid_cmpd3 = H5I_INVALID_HID; /* Compound3 Datatype ID */
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write in compound1 */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4584,20 +4584,20 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
- hid_t fid = -1; /* HDF5 File ID */
- hid_t did_dset = -1; /* dataset ID */
- hid_t sid_dset = -1; /* dataset space ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd3 = -1; /* compound3 type ID */
- hid_t tid_cmpd2 = -1; /* compound2 type ID */
- hid_t tid_cmpd2_arry = -1;
- hid_t tid_cmpd1 = -1; /* compound1 type ID */
- hid_t tid_cmpd1_vlen = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd3 = H5I_INVALID_HID; /* compound3 type ID */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
+ hid_t tid_cmpd2_arry = H5I_INVALID_HID;
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4717,14 +4717,14 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
#define DIM_ARRY 3
static void test_data_nocomparables(const char * fname, int make_diffs)
{
- hid_t fid = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t did1 = -1;
- hid_t did2 = -1;
- hid_t sid1 = -1;
- hid_t tid_dset1 = -1;
- hid_t tid_attr1 = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t did1 = H5I_INVALID_HID;
+ hid_t did2 = H5I_INVALID_HID;
+ hid_t sid1 = H5I_INVALID_HID;
+ hid_t tid_dset1 = H5I_INVALID_HID;
+ hid_t tid_attr1 = H5I_INVALID_HID;
hsize_t dims1_1[1] = { DIM_ARRY };
hsize_t dims1_2[1] = { DIM_ARRY + 1 };
hsize_t dims2[2] = { DIM_ARRY, 1 };
@@ -4913,14 +4913,14 @@ out:
static void
test_objs_nocomparables(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t topgid1 = -1;
- hid_t topgid2 = -1;
- hid_t gid1 = -1;
- hid_t tid1 = -1;
- hid_t gid2 = -1;
- hid_t tid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t topgid1 = H5I_INVALID_HID;
+ hid_t topgid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t tid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t tid2 = H5I_INVALID_HID;
hsize_t dims[1] = { DIM_ARRY };
int data1[DIM_ARRY] = { 1, 1, 1 };
int data2[DIM_ARRY] = { 2, 2, 2 };
@@ -5039,12 +5039,12 @@ static hid_t mkstr(int size, H5T_str_t pad)
*-------------------------------------------------------------------------*/
static void test_objs_strings(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t f_type = -1;
- hid_t m_type = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t f_type = H5I_INVALID_HID;
+ hid_t m_type = H5I_INVALID_HID;
hsize_t dims1[] = { 3, 4 };
char string1A[12][3] = { "s1", "s2", "s3", "s4", "s5", "s6", "s", "s", "s9",
"s0", "s1", "s2" };
@@ -5211,10 +5211,10 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
RED, GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- herr_t H5_ATTR_SANITY_CHECK status;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
@@ -6202,10 +6202,10 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- herr_t H5_ATTR_SANITY_CHECK status;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
@@ -7193,11 +7193,11 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- herr_t H5_ATTR_SANITY_CHECK status;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
int fillvalue = 2;
@@ -7417,9 +7417,9 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
{
double *dbuf; /* information to write */
- hid_t ldid = -1; /* dataset ID */
- hid_t lsid = -1; /* dataspace ID */
- hid_t ltid = -1; /* datatype ID */
+ hid_t ldid = H5I_INVALID_HID; /* dataset ID */
+ hid_t lsid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t ltid = H5I_INVALID_HID; /* datatype ID */
size_t size;
hsize_t sdims[] = { 1 };
hsize_t tdims[] = { H5TOOLS_MALLOCSIZE / sizeof(double) + 1 };
@@ -7820,19 +7820,19 @@ static
void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
{
/* data dataset */
- hid_t did1 = -1; /* dataset ID */
- hid_t sid1 = -1; /* dataspace ID */
+ hid_t did1 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims1[2] = { 10, 10 };/* dimensions */
int *buf; /* dataset buffer */
/* reference dataset */
- hid_t did2 = -1; /* dataset ID */
- hid_t sid2 = -1; /* dataspace ID */
+ hid_t did2 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid2 = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims2[] = { 2 }; /* 2 references */
hdset_reg_ref_t *rbuf; /* buffer for write the references */
hsize_t start[10]; /* starting location of hyperslab */
hsize_t count[10]; /* element count of hyperslab */
hsize_t coord[5][2]; /* coordinates for point selection */
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int i;
/* allocate the buffer for write the references */
@@ -7931,12 +7931,12 @@ void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
static
int test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers */)
{
- hid_t did = -1;
- hid_t fid = -1;
- hid_t f_sid = -1;
- hid_t m_sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t f_sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[1] = { GBLL }; /* dataset dimensions */
hsize_t hs_size[1] = { GBLL / (1024 * 1024) }; /* hyperslab dimensions */
hsize_t chunk_dims[1] = { GBLL / 1024 }; /* chunk dimensions */
@@ -8030,8 +8030,8 @@ out:
static
int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf)
{
- hid_t aid = -1;
- hid_t sid = -1;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
/* create a space */
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
@@ -8070,8 +8070,8 @@ out:
static herr_t
write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf)
{
- hid_t did = -1;
- hid_t sid = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
/* create a space */
if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index 38f4118..b9e4ef5 100644
--- a/tools/test/h5dump/CMakeLists.txt
+++ b/tools/test/h5dump/CMakeLists.txt
@@ -43,10 +43,12 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5dumpgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dumpgentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
-include (CMakeTestsPBITS.cmake)
+ include (CMakeTestsPBITS.cmake)
-include (CMakeTestsVDS.cmake)
+ include (CMakeTestsVDS.cmake)
-include (CMakeTestsXML.cmake)
+ include (CMakeTestsXML.cmake)
+endif ()
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 310b1ed..026ab20 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -638,11 +638,11 @@ static void gent_softlink(void)
#define NY 2
static int gent_softlink2(void)
{
- hid_t fileid1 = -1;
- hid_t gid1 = -1, gid2 = -1;
- hid_t datatype = -1;
- hid_t dset1 = -1, dset2 = -1;
- hid_t dataspace = -1;
+ hid_t fileid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID;
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dataspace = H5I_INVALID_HID;
hsize_t dimsf[2]; /* dataset dimensions */
int data1[NX][NY] = {{0,0},{1,1},{2,2},{3,3}};
int data2[NX][NY] = {{0,0},{0,1},{0,2},{3,3}};
@@ -1554,7 +1554,7 @@ gent_many(void)
dset1_t dset1[6];
hsize_t dim[4];
- herr_t H5_ATTR_SANITY_CHECK ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2548,7 +2548,7 @@ static void gent_opaque(void)
static void gent_bitfields(void)
{
- hid_t file, grp=-1, type=-1, space=-1, dset=-1;
+ hid_t file, grp=H5I_INVALID_HID, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
size_t i;
hsize_t nelmts;
unsigned char buf[32];
@@ -2603,7 +2603,7 @@ static void gent_vldatatypes(void)
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
int i;
- herr_t H5_ATTR_SANITY_CHECK ret=0;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret=0;
file = H5Fcreate(FILE21, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2698,7 +2698,7 @@ gent_vldatatypes2(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j,k; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i = 0; i < SPACE1_DIM1; i++) {
@@ -2771,7 +2771,7 @@ static void gent_vldatatypes3(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2840,7 +2840,7 @@ static void gent_vldatatypes4(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2904,7 +2904,7 @@ static void gent_vldatatypes5(void)
hid_t tid1;
hsize_t dims1[] = {SPACE1_DIM1};
int i,j; /* counting variable */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* initialize data for dataset */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2974,8 +2974,7 @@ static void gent_array1_big(void)
hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM};
hsize_t tdims1[] = {ARRAY1BIG_DIM};
int i,j; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
-
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* for region reference dataset */
hid_t dset2;
@@ -3109,7 +3108,7 @@ static void gent_array2(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
int i,j,k,l; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3157,7 +3156,7 @@ static void gent_array3(void)
hsize_t tdims1[] = {ARRAY1_DIM1};
hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
int i,j,k,l; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3213,7 +3212,7 @@ static void gent_array4(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3280,7 +3279,7 @@ static void gent_array5(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j,k; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3350,7 +3349,7 @@ static void gent_array6(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j,k; /* counting variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3411,7 +3410,7 @@ static void gent_array7(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j,k,l; /* Index variables */
- herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3471,11 +3470,11 @@ static void gent_array7(void)
/* Test the boundary of the display output buffer at the reallocation event */
static void gent_array8(void)
{
- hid_t file = -1; /* Handles */
- hid_t filetype = -1; /* Handles */
- hid_t space = -1; /* Handles */
- hid_t dset = -1; /* Handles */
- herr_t H5_ATTR_SANITY_CHECK status = -1;
+ hid_t file = H5I_INVALID_HID; /* Handles */
+ hid_t filetype = H5I_INVALID_HID; /* Handles */
+ hid_t space = H5I_INVALID_HID; /* Handles */
+ hid_t dset = H5I_INVALID_HID; /* Handles */
+ herr_t H5_ATTR_NDEBUG_UNUSED status = -1;
hsize_t sdims[] = {F64_DIM0};
hsize_t tdims[] = {F64_DIM1};
int *wdata; /* Write buffer */
@@ -3542,7 +3541,7 @@ static void gent_empty(void)
} empty_struct;
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
- herr_t H5_ATTR_SANITY_CHECK ret=0;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret=0;
file = H5Fcreate(FILE32, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3930,7 +3929,7 @@ static void write_attr_in(hid_t loc_id,
hid_t aid;
hid_t sid;
hid_t tid;
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, n;
float f;
@@ -4371,7 +4370,7 @@ static void write_dset_in(hid_t loc_id,
hid_t sid;
hid_t tid;
hid_t plist_id;
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, n;
float f;
int fillvalue=2;
@@ -4809,7 +4808,7 @@ static void gent_attr_all(void)
hid_t root_id;
hid_t sid;
hsize_t dims[1] = {2};
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
/* Create a file and a dataset */
fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4967,7 +4966,7 @@ static void gent_compound_complex(void)
hid_t array4_tid; /* Array datatype handle */
hid_t datafile, dataset; /* Datafile/dataset handles */
hid_t dataspace; /* Dataspace handle */
- herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = {F41_LENGTH}; /* Dataspace dimensions */
hsize_t array_dimb[] = {F41_DIMb}; /* Array dimensions */
hsize_t array_dimd[]={F41_ARRAY_DIMd1,F41_ARRAY_DIMd2}; /* Array dimensions */
@@ -5116,7 +5115,7 @@ static void gent_named_dtype_attr(void)
hid_t aid;
hid_t gid;
int data=8;
- herr_t H5_ATTR_SANITY_CHECK ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Create a file */
fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5338,7 +5337,7 @@ make_external(hid_t fid)
hsize_t cur_size[1]; /*data space current size */
hsize_t max_size[1]; /*data space maximum size */
hsize_t size; /*bytes reserved for data in the external file*/
- int H5_ATTR_SANITY_CHECK ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
cur_size[0] = max_size[0] = 100;
size = (max_size[0]*sizeof(int)/2);
@@ -5386,7 +5385,8 @@ static void gent_filters(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, H5_ATTR_SANITY_CHECK ret;
+ int i, j, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
@@ -5732,8 +5732,7 @@ static void gent_fcontents(void)
hid_t tid; /* datatype ID */
hsize_t dims[1]={4};
int buf[4]={1,2,3,4};
- int H5_ATTR_SANITY_CHECK ret;
-
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5866,7 +5865,7 @@ static void gent_fvalues(void)
hvl_t fillval3; /* vlen fill value */
hsize_t dimarray[1]={3}; /* array dimension */
int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int H5_ATTR_SANITY_CHECK ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6026,7 +6025,7 @@ static void gent_string(void)
hsize_t dims1[] = {1};
hsize_t dims2[] = {SPACE1_DIM1};
hsize_t dims4[1];
- int H5_ATTR_SANITY_CHECK ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
dims4[0] = sizeof(buf4);
@@ -6121,7 +6120,8 @@ static void gent_aindices(void)
int buf2[10][10];
int buf3[2][10][10];
int buf4[2][2][10][10];
- int i, j, k, l, n, H5_ATTR_SANITY_CHECK ret;
+ int i, j, k, l, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i = n = 0; i < 100; i++)
buf1[i] = n++;
@@ -6190,7 +6190,7 @@ static void gent_longlinks(void)
{
hid_t fid = (-1); /* File ID */
hid_t gid = (-1); /* Group ID */
- hid_t H5_ATTR_SANITY_CHECK gid2 = (-1); /* Datatype ID */
+ hid_t H5_ATTR_NDEBUG_UNUSED gid2 = (-1); /* Datatype ID */
char *objname = NULL; /* Name of object [Long] */
size_t u; /* Local index variable */
@@ -6353,12 +6353,12 @@ gent_binary(void)
static void
gent_bigdims(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t f_sid = -1;
- hid_t m_sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t f_sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[1]={DIM_4GB}; /* dataset dimensions */
hsize_t chunk_dims[1]={1024}; /* chunk dimensions */
hsize_t hs_start[1];
@@ -6369,7 +6369,7 @@ gent_bigdims(void)
hsize_t i;
char c;
size_t nelmts;
- int H5_ATTR_SANITY_CHECK ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6418,19 +6418,19 @@ gent_bigdims(void)
/* close */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if(H5Sclose(f_sid) < 0)
goto out;
- f_sid = -1;
+ f_sid = H5I_INVALID_HID;
if(H5Sclose(m_sid) < 0)
goto out;
- m_sid = -1;
+ m_sid = H5I_INVALID_HID;
if(H5Pclose(dcpl) < 0)
goto out;
- dcpl = -1;
+ dcpl = H5I_INVALID_HID;
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
ret = H5Fclose(fid);
HDassert(ret >= 0);
@@ -6465,7 +6465,8 @@ gent_hyperslab(void)
hid_t fid; /* file id */
hsize_t dims[2] = {32,4097}; /* big enough data size to force a second stripmine read */
double *buf;
- int i, H5_ATTR_SANITY_CHECK ret;
+ int i;
+ int H5_ATTR_NDEBUG_UNUSED ret;
buf = (double*) HDmalloc(32 * 4097 * sizeof(double) );
for(i = 0; i < 32 * 4097; i++)
@@ -6494,10 +6495,10 @@ gent_hyperslab(void)
static void
gent_group_creation_order(void)
{
- hid_t fid = -1; /* file ID */
- hid_t gid = -1; /* group ID */
- hid_t gcpl_id = -1; /* group creation property list ID */
- hid_t fcpl_id = -1; /* file creation property list ID (to set root group order) */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t gid = H5I_INVALID_HID; /* group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* group creation property list ID */
+ hid_t fcpl_id = H5I_INVALID_HID; /* file creation property list ID (to set root group order) */
if((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto out;
@@ -6523,45 +6524,45 @@ gent_group_creation_order(void)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
@@ -6576,56 +6577,56 @@ gent_group_creation_order(void)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if(H5Pclose(gcpl_id) < 0)
goto out;
- gcpl_id = -1;
+ gcpl_id = H5I_INVALID_HID;
if(H5Pclose(fcpl_id) < 0)
goto out;
- fcpl_id = -1;
+ fcpl_id = H5I_INVALID_HID;
if(H5Fclose(fid) < 0)
goto out;
- fid = -1;
+ fid = H5I_INVALID_HID;
return;
@@ -6653,15 +6654,15 @@ gent_group_creation_order(void)
static void
gent_attr_creation_order(void)
{
- hid_t fid = -1; /* file id */
- hid_t gid = -1; /* group id */
- hid_t did = -1; /* dataset id */
- hid_t sid = -1; /* space id */
- hid_t aid = -1; /* attribute id */
- hid_t tid = -1; /* datatype id */
- hid_t gcpl_id = -1; /* group creation property list ID */
- hid_t dcpl_id = -1; /* dataset creation property list ID */
- hid_t tcpl_id = -1; /* datatype creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t did = H5I_INVALID_HID; /* dataset id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t aid = H5I_INVALID_HID; /* attribute id */
+ hid_t tid = H5I_INVALID_HID; /* datatype id */
+ hid_t gcpl_id = H5I_INVALID_HID; /* group creation property list ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t tcpl_id = H5I_INVALID_HID; /* datatype creation property list ID */
int i;
const char *attr_name[3] = {"c", "b", "a" };
@@ -6714,12 +6715,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
@@ -6740,12 +6741,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
@@ -6766,12 +6767,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a group without creation order tracked for attributes and atributes in it
@@ -6790,12 +6791,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a named datatype with creation order tracked for attributes and atributes in it
@@ -6817,12 +6818,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a named datatype without creation order tracked for attributes and atributes in it
@@ -6844,12 +6845,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* add some attributes to the root group
@@ -6867,12 +6868,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* close
@@ -6880,19 +6881,19 @@ gent_attr_creation_order(void)
*/
if(H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
if(H5Pclose(dcpl_id) < 0)
goto out;
- dcpl_id = -1;
+ dcpl_id = H5I_INVALID_HID;
if(H5Pclose(gcpl_id) < 0)
goto out;
- gcpl_id = -1;
+ gcpl_id = H5I_INVALID_HID;
if(H5Pclose(tcpl_id) < 0)
goto out;
- tcpl_id = -1;
+ tcpl_id = H5I_INVALID_HID;
if(H5Fclose(fid) < 0)
goto out;
- fid = -1;
+ fid = H5I_INVALID_HID;
@@ -7091,7 +7092,8 @@ gent_dataset_idx(void)
hsize_t dims[2];
hsize_t maxdims[2];
int buf[20][10];
- int i, j, H5_ATTR_SANITY_CHECK ret;
+ int i, j;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* Get a copy of the file aaccess property */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -7615,7 +7617,7 @@ static void
gent_charsets(void)
{
hid_t fid, did, sid;
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
hsize_t dim[] = {1}; /* Dataspace dimensions */
typedef struct CharSetInfo {
const char *ascii_p_;
@@ -7689,7 +7691,7 @@ static void gent_compound_intsizes(void) {
Array1Struct *Array1;
hid_t Array1Structid; /* File datatype identifier */
- herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
@@ -7962,7 +7964,7 @@ static void gent_compound_attr_intsizes(void) {
Array1Struct Array1[F70_LENGTH];
hid_t Array1Structid; /* File datatype identifier */
- herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
@@ -8838,7 +8840,7 @@ static void gent_compound_int_array(void) {
Cmpd1Struct *Cmpd1;
hid_t Cmpd1Structid; /* File datatype identifier */
- herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */
int m, n; /* Array init loop vars */
@@ -9094,7 +9096,7 @@ static void gent_compound_ints(void) {
hid_t Cmpd1Structid; /* File datatype identifier */
hid_t Cmpd2Structid; /* File datatype identifier */
- herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */
int m; /* Array init loop vars */
@@ -9797,7 +9799,7 @@ static void gent_bitnopaquefields(void)
uint64_t d;
} s_t;
- hid_t file, grp=-1, type=-1, space=-1, dset=-1;
+ hid_t file_id=H5I_INVALID_HID, grp=H5I_INVALID_HID, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
size_t i;
hsize_t nelmts = F80_DIM32;
uint8_t buf[F80_DIM32]; /* bitfield, opaque */
@@ -9806,9 +9808,9 @@ static void gent_bitnopaquefields(void)
uint64_t buf4[F80_DIM32]; /* bitfield, opaque */
s_t buf5[F80_DIM32]; /* compound */
- file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if ((grp = H5Gcreate2(file, "bittypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "bittypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* bitfield_1 */
if ((type = H5Tcopy(H5T_STD_B8LE)) >= 0) {
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
@@ -9872,7 +9874,7 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- if ((grp = H5Gcreate2(file, "opaquetypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "opaquetypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* opaque_1 */
if ((type = H5Tcreate(H5T_OPAQUE, 1)) >= 0) {
if ((H5Tset_tag(type, "1-byte opaque type")) >= 0) {
@@ -9908,7 +9910,7 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- if ((grp = H5Gcreate2(file, "cmpdtypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "cmpdtypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* compound_1 */
if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) {
H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE);
@@ -9934,7 +9936,7 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- H5Fclose(file);
+ H5Fclose(file_id);
}
/*-------------------------------------------------------------------------
@@ -10033,9 +10035,9 @@ static void gent_compound_complex2(void)
compound *buf; /* compound */
- hid_t file, type=-1, space=-1, dset=-1;
+ hid_t file, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
hid_t dset_array_a, dset_array_b, dset_array_c;
- hid_t cmpd_tid1 = -1, cmpd_tid2 = -1, cmpd_tid3 = -1;
+ hid_t cmpd_tid1 = H5I_INVALID_HID, cmpd_tid2 = H5I_INVALID_HID, cmpd_tid3 = H5I_INVALID_HID;
size_t i;
size_t j, k;
unsigned dset_array_ndims;
@@ -10321,7 +10323,7 @@ static void gent_vlenstr_array(void)
};
const char *buffer[F83_DIM*F83_ARRAYDIM];
- hid_t file, type=-1, space=-1, dset=-1;
+ hid_t file, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
hid_t cmpd_tid1, array_tid;
int i, j;
@@ -10396,7 +10398,8 @@ static void gent_udfilter(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, H5_ATTR_SANITY_CHECK ret;
+ int i, j, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
@@ -10564,10 +10567,10 @@ static void gent_null_space_group(void)
static void
gent_err_attr_dspace(void)
{
- hid_t fid = -1; /* File identifier */
- hid_t fcpl = -1; /* File access property list */
- hid_t sid = -1; /* Dataspace identifier */
- hid_t aid = -1; /* Attribute identifier */
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ hid_t fcpl = H5I_INVALID_HID; /* File access property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace identifier */
+ hid_t aid = H5I_INVALID_HID; /* Attribute identifier */
hsize_t dims = 2; /* Dimensino size */
int wdata[2] = {7, 42}; /* The buffer to write */
int fd = -1; /* The file descriptor */
diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt
index 55d5623..9e49c4f 100644
--- a/tools/test/h5format_convert/CMakeLists.txt
+++ b/tools/test/h5format_convert/CMakeLists.txt
@@ -25,4 +25,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5fc_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_gentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c
index 8369668..ad1742b 100644
--- a/tools/test/h5format_convert/h5fc_chk_idx.c
+++ b/tools/test/h5format_convert/h5fc_chk_idx.c
@@ -45,8 +45,8 @@ main(int argc, char *argv[])
{
char *fname = NULL;
char *dname = NULL;
- hid_t fid = -1;
- hid_t did = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
/* h5fc_chk_idx fname dname */
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index b482dee..1e9e2cf 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -77,12 +77,12 @@ const char *FILENAME[] = {
static void
gen_non(const char *fname)
{
- hid_t fid = -1; /* file id */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did1 = -1, did2 = -1; /* dataset id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did1 = -1, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
hsize_t max_dims[2]; /* maximum dataset dimension */
@@ -307,11 +307,11 @@ error:
static void
gen_edge(const char *fname)
{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t sid = -1; /* dataspace id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did = -1; /* dataset id */
+ 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 dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did = H5I_INVALID_HID; /* dataset id */
hsize_t dims2[2] = {12, 6}; /* Dataset dimensions */
hsize_t c_dims[2] = {5, 5}; /* Chunk dimensions */
float buf[12][6]; /* Buffer for writing data */
@@ -395,14 +395,14 @@ error:
static void
gen_err_level(const char *fname)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* file access property list */
- hid_t fcpl = -1; /* file creation property list */
- hid_t sid = -1; /* dataspace id */
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t did = -1; /* dataset ID */
- hid_t fsid = -1; /* file dataspace ID */
- hid_t msid = -1; /* memory dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* file access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
unsigned char *buf = NULL; /* buffer for data */
hsize_t dims[2] = {0, 1}; /* dataset dimension sizes */
hsize_t max_dims[2] = {1, H5S_UNLIMITED}; /* dataset maximum dimension sizes */
@@ -534,13 +534,13 @@ error:
static void
gen_ext(const char *fname, unsigned new_format, unsigned what)
{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did1 = -1, did2 = -1; /* dataset id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
hsize_t max_dims[2]; /* maximum dataset dimension */
diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt
index 9364683..a77ba00 100644
--- a/tools/test/h5import/CMakeLists.txt
+++ b/tools/test/h5import/CMakeLists.txt
@@ -15,4 +15,6 @@ else ()
endif ()
set_target_properties (h5importtest PROPERTIES FOLDER tools)
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt
index 6fdf7b0..f00e781 100644
--- a/tools/test/h5jam/CMakeLists.txt
+++ b/tools/test/h5jam/CMakeLists.txt
@@ -36,4 +36,6 @@ else ()
endif ()
set_target_properties (tellub PROPERTIES FOLDER tools)
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index 26a427d..f496a7a 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -81,7 +81,7 @@ parse_command_line(int argc, const char *argv[])
int
main(int argc, const char *argv[])
{
- int fd = -1;
+ int fd = H5I_INVALID_HID;
unsigned size;
char *filename = NULL;
long res;
diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt
index 0da03c5..abbe6d0 100644
--- a/tools/test/h5ls/CMakeLists.txt
+++ b/tools/test/h5ls/CMakeLists.txt
@@ -30,6 +30,8 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
-include (CMakeTestsVDS.cmake)
+ include (CMakeTestsVDS.cmake)
+endif ()
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index f81ce4f..5722354 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -98,4 +98,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5repackgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repackgentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index ff8fbda..2654685 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -1779,9 +1779,9 @@ error:
static
int make_testfiles(void)
{
- hid_t fid = -1;
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
unsigned j; /* Local index variable */
/*-------------------------------------------------------------------------
@@ -2210,12 +2210,12 @@ out:
static
int make_all_objects(hid_t loc_id)
{
- hid_t did = -1;
- hid_t gid = -1;
- hid_t tid = -1;
- hid_t rid = -1;
- hid_t sid = -1;
- hid_t gcplid = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t rid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t gcplid = H5I_INVALID_HID;
hsize_t dims[1] = {2};
/* compound datatype */
typedef struct s_t
@@ -2332,10 +2332,10 @@ out:
static
int make_attributes(hid_t loc_id)
{
- hid_t did = -1;
- hid_t gid = -1;
- hid_t rid = -1;
- hid_t sid = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t rid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {2};
/*-------------------------------------------------------------------------
@@ -2403,8 +2403,8 @@ static
int make_hlinks(hid_t loc_id)
{
hid_t g1id =- 1;
- hid_t g2id = -1;
- hid_t g3id = -1;
+ hid_t g2id = H5I_INVALID_HID;
+ hid_t g3id = H5I_INVALID_HID;
hsize_t dims[2] = {3,2};
int buf[3][2] = {{1,1}, {1,2}, {2,2}};
@@ -2473,8 +2473,8 @@ out:
static
int make_szip(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block = 8;
hsize_t dims[RANK] = {DIM1, DIM2};
@@ -2544,8 +2544,8 @@ out:
static
int make_deflate(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf[DIM1][DIM2];
@@ -2684,8 +2684,8 @@ out:
static
int make_fletcher32(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
@@ -2751,10 +2751,10 @@ out:
static
int make_nbit(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
- hid_t dtid = -1;
- hid_t dsid = -1;
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dtid = H5I_INVALID_HID;
+ hid_t dsid = H5I_INVALID_HID;
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
@@ -2832,10 +2832,10 @@ out:
static
int make_scaleoffset(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
- hid_t dtid = -1;
- hid_t dsid = -1;
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dtid = H5I_INVALID_HID;
+ hid_t dsid = H5I_INVALID_HID;
hsize_t dims[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf[DIM1][DIM2];
@@ -3077,11 +3077,11 @@ int make_early(void)
{
hsize_t dims[1] ={3000};
hsize_t cdims[1]={30};
- hid_t fid=-1;
- hid_t did=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t dcpl=-1;
+ hid_t fid=H5I_INVALID_HID;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t dcpl=H5I_INVALID_HID;
int i;
char name[16];
int iter=100;
@@ -3172,8 +3172,8 @@ out:
static
int make_layout(hid_t loc_id)
{
- hid_t dcpl=-1; /* dataset creation property list */
- hid_t sid=-1; /* dataspace ID */
+ hid_t dcpl=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid=H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
@@ -3286,12 +3286,12 @@ static
int make_layout2(hid_t loc_id)
{
- hid_t contig_dcpl = -1; /* dataset creation property list */
- hid_t chunked_dcpl = -1; /* dataset creation property list */
+ hid_t contig_dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t chunked_dcpl = H5I_INVALID_HID; /* dataset creation property list */
int i, j, n; /* Local index variables */
int ret_value = -1; /* Return value */
- hid_t s_sid = -1; /* dataspace ID */
+ hid_t s_sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t s_dims[RANK] = {S_DIM1,S_DIM2}; /* Dataspace (< 1 k) */
hsize_t chunk_dims[RANK] = {S_DIM1/2, S_DIM2/2}; /* Dimension sizes for chunks */
@@ -3361,11 +3361,11 @@ out:
static
int make_layout3(hid_t loc_id)
{
- hid_t dcpl1=-1; /* dataset creation property list */
- hid_t dcpl2=-1; /* dataset creation property list */
- hid_t dcpl3=-1; /* dataset creation property list */
- hid_t sid1=-1; /* dataspace ID */
- hid_t sid2=-1; /* dataspace ID */
+ hid_t dcpl1=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t dcpl2=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t dcpl3=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid1=H5I_INVALID_HID; /* dataspace ID */
+ hid_t sid2=H5I_INVALID_HID; /* dataspace ID */
hsize_t dims1[RANK]={DIM1_L3,DIM2_L3};
hsize_t dims2[RANK]={SDIM1_L3,SDIM2_L3};
hsize_t maxdims[RANK]={H5S_UNLIMITED, H5S_UNLIMITED};
@@ -3494,8 +3494,8 @@ out:
static
int make_fill(hid_t loc_id)
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
hid_t dcpl;
hsize_t dims[2]={3,2};
int buf[3][2]= {{1,1},{1,2},{2,2}};
@@ -3547,9 +3547,9 @@ out:
static
int make_big(hid_t loc_id)
{
- hid_t did=-1;
- hid_t f_sid=-1;
- hid_t m_sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t f_sid=H5I_INVALID_HID;
+ hid_t m_sid=H5I_INVALID_HID;
hid_t tid;
hid_t dcpl;
hsize_t dims[1]={ H5TOOLS_MALLOCSIZE + 1}; /* dataset dimensions */
@@ -3628,8 +3628,8 @@ out:
static
int make_external(hid_t loc_id)
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
hid_t dcpl;
int buf[2]={1,2};
hsize_t cur_size[1]; /* data space current size */
@@ -3682,11 +3682,11 @@ out:
static int
make_userblock(void)
{
- hid_t fid = -1;
- hid_t fcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */
size_t u; /* Local index variable */
/* Create file creation property list with userblock set */
@@ -3744,12 +3744,12 @@ out:
static int
verify_userblock( const char* filename)
{
- hid_t fid = -1;
- hid_t fcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
hsize_t ub_size = 0; /* User block size */
- ssize_t H5_ATTR_SANITY_CHECK nread; /* # of bytes read */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nread; /* # of bytes read */
size_t u; /* Local index variable */
/* Open file with userblock */
@@ -3816,7 +3816,7 @@ make_userblock_file(void)
{
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */
size_t u; /* Local index variable */
/* initialize userblock data */
@@ -3874,10 +3874,10 @@ int write_dset_in(hid_t loc_id,
GREEN
} e_t;
- hid_t did=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t pid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t pid=H5I_INVALID_HID;
unsigned i, j;
int val, k, n;
float f;
@@ -4620,10 +4620,10 @@ out:
static
int make_dset_reg_ref(hid_t loc_id)
{
- hid_t did1=-1; /* Dataset ID */
- hid_t did2=-1; /* Dereferenced dataset ID */
- hid_t sid1=-1; /* Dataspace ID #1 */
- hid_t sid2=-1; /* Dataspace ID #2 */
+ hid_t did1=H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2=H5I_INVALID_HID; /* Dereferenced dataset ID */
+ hid_t sid1=H5I_INVALID_HID; /* Dataspace ID #1 */
+ hid_t sid2=H5I_INVALID_HID; /* Dataspace ID #2 */
hsize_t dims1[] = {SPACE1_DIM1};
hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
@@ -4739,9 +4739,9 @@ int write_attr_in(hid_t loc_id,
GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
int val, j, k, n;
unsigned i;
float f;
@@ -4824,7 +4824,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -4854,7 +4854,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -4881,7 +4881,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -4919,7 +4919,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -4968,7 +4968,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5013,13 +5013,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5054,7 +5054,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5132,7 +5132,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -5165,7 +5165,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -5193,7 +5193,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -5229,7 +5229,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -5284,7 +5284,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5335,13 +5335,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5384,7 +5384,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5504,7 +5504,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -5558,7 +5558,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -5572,7 +5572,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -5658,7 +5658,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -5743,7 +5743,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5797,13 +5797,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5837,7 +5837,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5917,7 +5917,7 @@ int make_dset(hid_t loc_id,
hid_t dcpl,
void *buf)
{
- hid_t did=-1;
+ hid_t did=H5I_INVALID_HID;
if ((did = H5Dcreate2(loc_id, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
return -1;
@@ -5954,8 +5954,8 @@ int write_dset( hid_t loc_id,
hid_t tid,
void *buf )
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
return -1;
@@ -6040,11 +6040,11 @@ static
int make_named_dtype(hid_t loc_id)
{
hsize_t dims[1] ={3};
- hid_t did=-1;
- hid_t aid=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t gid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t aid=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t gid=H5I_INVALID_HID;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt
index 5c17fd5..0e2ee5e 100644
--- a/tools/test/h5stat/CMakeLists.txt
+++ b/tools/test/h5stat/CMakeLists.txt
@@ -14,4 +14,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5stat_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat_gentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index 2edfcf6..0bf1001 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -54,14 +54,14 @@
static void
gen_newgrat_file(const char *fname)
{
- hid_t fcpl = -1; /* File creation property */
- hid_t fapl = -1; /* File access property */
- hid_t fid = -1; /* File id */
- hid_t gid = -1; /* Group id */
- hid_t tid = -1; /* Datatype id */
- hid_t sid = -1; /* Dataspace id */
- hid_t attr_id = -1; /* Attribute id */
- hid_t did = -1; /* Dataset id */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property */
+ hid_t fapl = H5I_INVALID_HID; /* File access property */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t gid = H5I_INVALID_HID; /* Group id */
+ hid_t tid = H5I_INVALID_HID; /* Datatype id */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace id */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
char name[30]; /* Group name */
char attrname[30]; /* Attribute name */
int i; /* Local index variable */
@@ -139,15 +139,15 @@ error:
static void
gen_threshold_file(const char *fname)
{
- hid_t fid = -1; /* File ID */
- hid_t sid0 = -1; /* Dataspace IDs */
- hid_t sid1 = -1; /* Dataspace IDs */
- hid_t sid2 = -1; /* Dataspace IDs */
- hid_t sid3 = -1; /* Dataspace IDs */
- hid_t sid4 = -1; /* Dataspace IDs */
- hid_t did = -1; /* Dataset ID */
- hid_t attr_id = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid0 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid3 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid4 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t two_dims[] = {2, 5}; /* Dimension array */
hsize_t one_dims[] = {6}; /* Dimension array */
hsize_t zero_dims[] = {0}; /* Dimension array */
@@ -323,11 +323,11 @@ error:
static void
gen_idx_file(const char *fname)
{
- hid_t fapl = -1; /* file access property id */
- hid_t fid = -1; /* file id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did = -1, did2 = -1; /* dataset id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did = -1, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims[1] = {10}; /* dataset dimension */
hsize_t c_dims[1] = {2}; /* chunk dimension */
int i; /* local index variable */
@@ -413,12 +413,12 @@ error:
static void
gen_err_refcount(const char *fname)
{
- hid_t fid = -1; /* File identifier */
- hid_t sid = -1; /* Dataspace message */
- hid_t did = -1; /* Dataset identifier */
- hid_t gid = -1; /* Group identifier */
- hid_t aid1 = -1, aid2 = -1; /* Attribute identifier */
- hid_t tid = -1; /* Datatype identifier */
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace message */
+ hid_t did = H5I_INVALID_HID; /* Dataset identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group identifier */
+ hid_t aid1 = -1, aid2 = H5I_INVALID_HID; /* Attribute identifier */
+ hid_t tid = H5I_INVALID_HID; /* Datatype identifier */
int i, n; /* Local index variables */
int buf[10]; /* Data buffer */
hsize_t dims[1]; /* Dimension size */
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
index a250222..089a302 100644
--- a/tools/test/misc/CMakeLists.txt
+++ b/tools/test/misc/CMakeLists.txt
@@ -55,6 +55,8 @@ else ()
endif ()
set_target_properties (clear_open_chk PROPERTIES FOLDER tools)
-include (CMakeTestsRepart.cmake)
-include (CMakeTestsClear.cmake)
-include (CMakeTestsMkgrp.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTestsRepart.cmake)
+ include (CMakeTestsClear.cmake)
+ include (CMakeTestsMkgrp.cmake)
+endif ()
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 96d7e75e7..1411c21 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -56,10 +56,10 @@ const char *FILENAME_ENHANCE[] = {
static int
gen_cache_image_file(const char *fname)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1, sid = -1; /* Dataset ID, dataspace ID */
- hid_t fapl = -1; /* File access property list */
- hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = -1, sid = H5I_INVALID_HID; /* Dataset ID, dataspace ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
hsize_t dims[2]; /* Dimension sizes */
hsize_t chunks[2]; /* Chunked dimension sizes */
int buf[50][100]; /* Buffer for data to write */
@@ -164,10 +164,10 @@ error:
static int
gen_enhance_files(hbool_t user)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1]; /* Dimension sizes */
int data[NUM_ELMTS]; /* Buffer for data */
int fd = -1; /* The file descriptor ID */
@@ -361,13 +361,13 @@ error:
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1, new_fapl = -1; /* File access property lists */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl = -1, new_fapl = H5I_INVALID_HID; /* File access property lists */
char fname[512]; /* File name */
unsigned new_format; /* To use latest library format or not */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1]; /* Dimension sizes */
int data[NUM_ELMTS]; /* Buffer for data */
int i; /* Local index variables */
diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c
index b8e0292..7227de0 100644
--- a/tools/test/misc/repart_test.c
+++ b/tools/test/misc/repart_test.c
@@ -47,8 +47,8 @@ herr_t test_single_h5repart_opens(void);
herr_t
test_family_h5repart_opens(void)
{
- hid_t fid = -1;
- hid_t fapl_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
/* open 1st file(single member file) with correct family size(20000 byte) */
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -102,7 +102,7 @@ error:
herr_t
test_single_h5repart_opens(void)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
/* open the single file */
if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 7f1f038..c69d1f7 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -32,11 +32,11 @@ const char *setname = "align";
int main(void)
{
- hid_t fil=-1, spc=-1, set=-1;
- hid_t cs6=-1, cmp=-1, fix=-1;
- hid_t cmp1=-1, cmp2=-1, cmp3=-1;
- hid_t plist=-1;
- hid_t array_dt=-1;
+ hid_t fil=H5I_INVALID_HID, spc=H5I_INVALID_HID, set=H5I_INVALID_HID;
+ hid_t cs6=H5I_INVALID_HID, cmp=H5I_INVALID_HID, fix=H5I_INVALID_HID;
+ hid_t cmp1=H5I_INVALID_HID, cmp2=H5I_INVALID_HID, cmp3=H5I_INVALID_HID;
+ hid_t plist=H5I_INVALID_HID;
+ hid_t array_dt=H5I_INVALID_HID;
hsize_t dim[2];
hsize_t cdim[4];
diff --git a/tools/test/misc/vds/UC_1_one_dim_gen.c b/tools/test/misc/vds/UC_1_one_dim_gen.c
index b997280..b5ddae3 100644
--- a/tools/test/misc/vds/UC_1_one_dim_gen.c
+++ b/tools/test/misc/vds/UC_1_one_dim_gen.c
@@ -59,16 +59,16 @@ static int UC_1_VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* dataset extents */
hsize_t start[RANK]; /* starting point for hyperslab */
diff --git a/tools/test/misc/vds/UC_2_two_dims_gen.c b/tools/test/misc/vds/UC_2_two_dims_gen.c
index bd70fda..8e1554b 100644
--- a/tools/test/misc/vds/UC_2_two_dims_gen.c
+++ b/tools/test/misc/vds/UC_2_two_dims_gen.c
@@ -68,16 +68,16 @@ static int UC_2_VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t start[RANK]; /* starting point for hyperslab */
hsize_t extent[RANK]; /* dataset extents */
diff --git a/tools/test/misc/vds/UC_3_gaps_gen.c b/tools/test/misc/vds/UC_3_gaps_gen.c
index e6e7226..74a23dc 100644
--- a/tools/test/misc/vds/UC_3_gaps_gen.c
+++ b/tools/test/misc/vds/UC_3_gaps_gen.c
@@ -29,12 +29,12 @@
static herr_t
create_3_1_vds(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* source starting point for hyperslab */
hsize_t position[RANK]; /* vds mapping positions */
@@ -136,12 +136,12 @@ error:
static herr_t
create_3_2_vds(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* source starting point for hyperslab */
diff --git a/tools/test/misc/vds/UC_4_printf_gen.c b/tools/test/misc/vds/UC_4_printf_gen.c
index b328046..24451e9 100644
--- a/tools/test/misc/vds/UC_4_printf_gen.c
+++ b/tools/test/misc/vds/UC_4_printf_gen.c
@@ -27,16 +27,16 @@
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
/* Hyperslab arrays */
hsize_t start[RANK] = {0, 0, 0};
diff --git a/tools/test/misc/vds/UC_5_stride_gen.c b/tools/test/misc/vds/UC_5_stride_gen.c
index a105bbd..726ce6e 100644
--- a/tools/test/misc/vds/UC_5_stride_gen.c
+++ b/tools/test/misc/vds/UC_5_stride_gen.c
@@ -27,16 +27,16 @@
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* source dataset extents */
hsize_t start[RANK]; /* starting point for hyperslab */
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index a01a88f..d788ffa 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -133,7 +133,7 @@ else ()
endif ()
set_target_properties (zip_perf PROPERTIES FOLDER perform)
-if (H5_HAVE_PARALLEL AND BUILD_TESTING)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
if (UNIX)
#-- Adding test for perf - only on unix systems
set (perf_SOURCES
@@ -191,4 +191,6 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
endif ()
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index f0ae416..5d61f7b 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -22,175 +22,176 @@ add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf t
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------
+if (HDF5_TEST_SERIAL)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME PERFORM_h5perform-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ chunk.h5
+ iopipe.h5
+ iopipe.raw
+ x-diag-rd.dat
+ x-diag-wr.dat
+ x-rowmaj-rd.dat
+ x-rowmaj-wr.dat
+ x-gnuplot
+ h5perf_serial.txt
+ h5perf_serial.txt.err
+ chunk.txt
+ chunk.txt.err
+ iopipe.txt
+ iopipe.txt.err
+ overhead.txt
+ overhead.txt.err
+ perf_meta.txt
+ perf_meta.txt.err
+ zip_perf-h.txt
+ zip_perf-h.txt.err
+ zip_perf.txt
+ zip_perf.txt.err
+ )
-# Remove any output file left over from previous test run
-add_test (
- NAME PERFORM_h5perform-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- chunk.h5
- iopipe.h5
- iopipe.raw
- x-diag-rd.dat
- x-diag-wr.dat
- x-rowmaj-rd.dat
- x-rowmaj-wr.dat
- x-gnuplot
- h5perf_serial.txt
- h5perf_serial.txt.err
- chunk.txt
- chunk.txt.err
- iopipe.txt
- iopipe.txt.err
- overhead.txt
- overhead.txt.err
- perf_meta.txt
- perf_meta.txt.err
- zip_perf-h.txt
- zip_perf-h.txt.err
- zip_perf.txt
- zip_perf.txt.err
-)
-
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>)
-else ()
- add_test (NAME PERFORM_h5perf_serial COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5perf_serial>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=h5perf_serial.txt"
- #-D "TEST_REFERENCE=h5perf_serial.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>)
+ else ()
+ add_test (NAME PERFORM_h5perf_serial COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5perf_serial>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=h5perf_serial.txt"
+ #-D "TEST_REFERENCE=h5perf_serial.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_h5perf_serial PROPERTIES
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_h5perf_serial PROPERTIES
- TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_BUILD_PERFORM_STANDALONE)
- add_test (NAME PERFORM_h5perf_serial_alone COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial_alone>)
-endif ()
+ if (HDF5_BUILD_PERFORM_STANDALONE)
+ add_test (NAME PERFORM_h5perf_serial_alone COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial_alone>)
+ endif ()
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_chunk COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:chunk>)
-else ()
- add_test (NAME PERFORM_chunk COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:chunk>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=chunk.txt"
- #-D "TEST_REFERENCE=chunk.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_chunk COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:chunk>)
+ else ()
+ add_test (NAME PERFORM_chunk COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:chunk>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=chunk.txt"
+ #-D "TEST_REFERENCE=chunk.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_chunk PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_chunk PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_iopipe COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:iopipe>)
-else ()
- add_test (NAME PERFORM_iopipe COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:iopipe>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=iopipe.txt"
- #-D "TEST_REFERENCE=iopipe.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_iopipe COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:iopipe>)
+ else ()
+ add_test (NAME PERFORM_iopipe COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:iopipe>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=iopipe.txt"
+ #-D "TEST_REFERENCE=iopipe.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_iopipe PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_iopipe PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_overhead COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:overhead>)
-else ()
- add_test (NAME PERFORM_overhead COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:overhead>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=overhead.txt"
- #-D "TEST_REFERENCE=overhead.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_overhead COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:overhead>)
+ else ()
+ add_test (NAME PERFORM_overhead COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:overhead>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=overhead.txt"
+ #-D "TEST_REFERENCE=overhead.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_overhead PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_overhead PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_perf_meta COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:perf_meta>)
-else ()
- add_test (NAME PERFORM_perf_meta COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:perf_meta>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=perf_meta.txt"
- #-D "TEST_REFERENCE=perf_meta.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_perf_meta COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:perf_meta>)
+ else ()
+ add_test (NAME PERFORM_perf_meta COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:perf_meta>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=perf_meta.txt"
+ #-D "TEST_REFERENCE=perf_meta.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_perf_meta PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_perf_meta PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_zip_perf_help COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> "-h")
-else ()
- add_test (NAME PERFORM_zip_perf_help COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=zip_perf-h.txt"
- #-D "TEST_REFERENCE=zip_perf-h.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_zip_perf_help COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> "-h")
+ else ()
+ add_test (NAME PERFORM_zip_perf_help COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=zip_perf-h.txt"
+ #-D "TEST_REFERENCE=zip_perf-h.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_zip_perf_help PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_zip_perf_help PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_zip_perf COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> tfilters.h5)
-else ()
- add_test (NAME PERFORM_zip_perf COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=zip_perf.txt"
- #-D "TEST_REFERENCE=zip_perf.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_zip_perf COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> tfilters.h5)
+ else ()
+ add_test (NAME PERFORM_zip_perf COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=zip_perf.txt"
+ #-D "TEST_REFERENCE=zip_perf.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_zip_perf PROPERTIES
+ DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects"
)
endif ()
-set_tests_properties (PERFORM_zip_perf PROPERTIES
- DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects"
-)
-if (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
if (UNIX)
add_test (NAME MPI_TEST_PERFORM_perf COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:perf> ${MPIEXEC_POSTFLAGS})
endif ()
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index 804f88e..3603c9b 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -72,7 +72,7 @@
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
-static hid_t fapl_g = -1;
+static hid_t fapl_g = H5I_INVALID_HID;
/* Local function prototypes */
static size_t
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 0e96cc7..bf4728d 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -133,7 +133,7 @@ synchronize (void)
#if defined(H5_HAVE_WIN32_API) && ! defined(__CYGWIN__)
_flushall();
#else
- int H5_ATTR_SANITY_CHECK status;
+ int H5_ATTR_NDEBUG_UNUSED status;
status = HDsystem("sync");
HDassert(status >= 0);
@@ -168,8 +168,7 @@ main (void)
static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
unsigned char *the_data = NULL;
- hid_t file, dset, file_space = -1;
- herr_t H5_ATTR_SANITY_CHECK status;
+ hid_t file, dset, file_space = H5I_INVALID_HID;
#ifdef H5_HAVE_GETRUSAGE
struct rusage r_start, r_stop;
#else
@@ -178,8 +177,9 @@ main (void)
struct timeval t_start, t_stop;
int fd;
unsigned u;
- hssize_t H5_ATTR_SANITY_CHECK n;
- off_t H5_ATTR_SANITY_CHECK offset;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
+ hssize_t H5_ATTR_NDEBUG_UNUSED n;
+ off_t H5_ATTR_NDEBUG_UNUSED offset;
hsize_t start[2];
hsize_t count[2];
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 653c28f..f3cb3ec 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -548,16 +548,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dcpl = -1; /* Dataset creation property list */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -1393,7 +1393,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -1449,7 +1449,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -1459,7 +1459,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -1469,7 +1469,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -1528,15 +1528,15 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -2348,7 +2348,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -2404,7 +2404,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -2414,7 +2414,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -2424,7 +2424,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -2442,7 +2442,7 @@ done:
do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
{
int ret_code = SUCCESS, mrc;
- hid_t acc_tpl = -1; /* file access templates */
+ hid_t acc_tpl = H5I_INVALID_HID; /* file access templates */
switch (param->io_type) {
case POSIXIO:
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 4dc4d0b..69409bb 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -114,11 +114,11 @@ static const char *multi_letters = "msbrglo"; /* string for multi driver */
/* HDF5 global variables */
static hsize_t h5count[MAX_DIMS]; /*selection count */
static hssize_t h5offset[MAX_DIMS]; /* Selection offset within dataspace */
-static hid_t h5dset_space_id = -1; /*dataset space ID */
-static hid_t h5mem_space_id = -1; /*memory dataspace ID */
-static hid_t h5ds_id = -1; /*dataset handle */
-static hid_t h5dcpl = -1; /* Dataset creation property list */
-static hid_t h5dxpl = -1; /* Dataset transfer property list */
+static hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+static hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+static hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
+static hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/*
* Function: do_sio
@@ -575,7 +575,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -587,7 +587,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -597,7 +597,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -607,7 +607,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -894,7 +894,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -906,7 +906,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -916,7 +916,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -926,7 +926,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -1137,7 +1137,7 @@ done:
hid_t
set_vfd(parameters *param)
{
- hid_t my_fapl = -1;
+ hid_t my_fapl = H5I_INVALID_HID;
vfdtype vfd;
vfd = param->vfd;
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 248ef9a..faa8317 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -527,4 +527,10 @@ typedef struct long_options {
extern int get_option(int argc, const char **argv, const char *opt,
const struct long_options *l_opt);
+
+extern int nCols; /*max number of columns for outputting */
+
+/* Definitions of useful routines */
+extern void print_version(const char *progname);
+
#endif