summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-03-20 19:07:40 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-03-20 19:07:40 (GMT)
commit222346f3732ba3bfb007da410e1b808be129aaaf (patch)
tree061d33723552465bbb3b672bfff10e4fe6bc2b96 /test
parent7add52ff4f2443357648d53d52add274d1b18b5f (diff)
parent604b67df19a164824b74fba0aa5e489b5a64d1ae (diff)
downloadhdf5-222346f3732ba3bfb007da410e1b808be129aaaf.zip
hdf5-222346f3732ba3bfb007da410e1b808be129aaaf.tar.gz
hdf5-222346f3732ba3bfb007da410e1b808be129aaaf.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5_bmr_fixbug into develop
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt29
-rw-r--r--test/CMakeTests.cmake159
-rw-r--r--test/CMakeVFDTests.cmake129
-rw-r--r--test/CMakeVOLTests.cmake127
-rw-r--r--test/accum.c6
-rw-r--r--test/app_ref.c6
-rw-r--r--test/big.c4
-rw-r--r--test/bittests.c174
-rw-r--r--test/direct_chunk.c121
-rw-r--r--test/flushrefreshTest.cmake102
-rw-r--r--test/h5test.c12
-rw-r--r--test/mount.c38
-rw-r--r--test/objcopy.c4
-rw-r--r--test/testframe.c338
-rw-r--r--test/titerate.c8
-rw-r--r--test/tselect.c1604
-rw-r--r--test/tsohm.c30
-rw-r--r--test/ttime.c6
-rw-r--r--test/tunicode.c2
-rw-r--r--test/tvlstr.c18
-rw-r--r--test/vds.c8
-rw-r--r--test/vfd.c44
-rw-r--r--test/vol.c24
23 files changed, 1443 insertions, 1550 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0d67485..772f790 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -45,7 +45,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_TEST_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
@@ -293,9 +293,9 @@ set (H5_TESTS_MULTIPLE
ttsafe
)
# Only build single source tests here
-foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE)
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_TESTS_MULTIPLE)
+ ADD_H5_EXE(${h5_test})
endif ()
endforeach ()
@@ -352,12 +352,17 @@ add_executable (ttsafe ${ttsafe_SOURCES})
target_include_directories(ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (ttsafe STATIC)
target_link_libraries (ttsafe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+if (NOT WIN32)
+ target_link_libraries (ttsafe
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ )
+endif ()
set_target_properties (ttsafe PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (ttsafe-shared ${ttsafe_SOURCES})
target_include_directories(ttsafe-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (ttsafe-shared SHARED)
- target_link_libraries (ttsafe-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (ttsafe-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
endif ()
@@ -378,15 +383,15 @@ set (H5_CHECK_TESTS
flushrefresh
)
-foreach (test ${H5_CHECK_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_CHECK_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
file (WRITE ${GREP_RUNNER}
"file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-if (\${TEST_RESULT} STREQUAL \"0\")
+if (NOT TEST_RESULT)
message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
else ()
message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
@@ -411,8 +416,8 @@ set (H5_SWMR_TESTS
swmr_writer
)
-foreach (test ${H5_SWMR_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_SWMR_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
set (H5_VDS_SWMR_TESTS
@@ -421,8 +426,8 @@ set (H5_VDS_SWMR_TESTS
vds_swmr_writer
)
-foreach (test ${H5_VDS_SWMR_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_VDS_SWMR_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
#-- Adding test for accum_swmr_reader
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 087461f..c606eb1 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -231,47 +231,31 @@ add_test (NAME H5TEST-clear-testhdf5-objects
)
set_tests_properties (H5TEST-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP clear_testhdf5)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
- set_tests_properties (H5TEST-testhdf5-base PROPERTIES
- FIXTURES_REQUIRED clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
- add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
- set_tests_properties (H5TEST-testhdf5-heap PROPERTIES
- FIXTURES_REQUIRED clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
- add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
- set_tests_properties (H5TEST-testhdf5-file PROPERTIES
- FIXTURES_REQUIRED clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
- add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
- set_tests_properties (H5TEST-testhdf5-select PROPERTIES
- FIXTURES_REQUIRED clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
-else ()
- add_test (NAME H5TEST-testhdf5 COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=testhdf5.txt"
- #-D "TEST_REFERENCE=testhdf5.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- set_tests_properties (H5TEST-testhdf5 PROPERTIES
- FIXTURES_REQUIRED clear_testhdf5
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
+add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
+set_tests_properties (H5TEST-testhdf5-base PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
+set_tests_properties (H5TEST-testhdf5-heap PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
+set_tests_properties (H5TEST-testhdf5-file PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
+set_tests_properties (H5TEST-testhdf5-select PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+if (NOT HDF5_ENABLE_USING_MEMCHECKER)
if (BUILD_SHARED_LIBS)
add_test (NAME H5TEST-shared-clear-testhdf5-objects
COMMAND ${CMAKE_COMMAND}
@@ -298,19 +282,28 @@ else ()
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
set_tests_properties (H5TEST-shared-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP shared_clear_testhdf5)
- add_test (NAME H5TEST-shared-testhdf5 COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=testhdf5.txt"
- #-D "TEST_REFERENCE=testhdf5.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ add_test (NAME H5TEST-shared-testhdf5-base COMMAND $<TARGET_FILE:testhdf5-shared> -x heap -x file -x select)
+ set_tests_properties (H5TEST-shared-testhdf5-base PROPERTIES
+ FIXTURES_REQUIRED shared_clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
- set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES
+ add_test (NAME H5TEST-shared-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5-shared> -o heap)
+ set_tests_properties (H5TEST-shared-testhdf5-heap PROPERTIES
FIXTURES_REQUIRED shared_clear_testhdf5
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-testhdf5-file COMMAND $<TARGET_FILE:testhdf5-shared> -o file)
+ set_tests_properties (H5TEST-shared-testhdf5-file PROPERTIES
+ FIXTURES_REQUIRED shared_clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-testhdf5-select COMMAND $<TARGET_FILE:testhdf5-shared> -o select)
+ set_tests_properties (H5TEST-shared-testhdf5-select PROPERTIES
+ FIXTURES_REQUIRED shared_clear_testhdf5
+ ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
endif ()
@@ -552,33 +545,33 @@ set (H5TEST_SEPARATE_TESTS
flush1
flush2
)
-foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
+foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
- set_tests_properties (H5TEST-${test} PROPERTIES
+ add_test (NAME H5TEST-${h5_test} COMMAND $<TARGET_FILE:${h5_test}>)
+ set_tests_properties (H5TEST-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
else ()
- if ("${test}" STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-${test}
+ if ("${h5_test}" STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-${h5_test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
)
else ()
- add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ add_test (NAME H5TEST-${h5_test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
+ -D "TEST_OUTPUT=${h5_test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (H5TEST-${test} PROPERTIES
+ set_tests_properties (H5TEST-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
@@ -587,10 +580,10 @@ foreach (test ${H5_TESTS})
endif ()
endforeach ()
-set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800)
-set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800)
-set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT 1800)
-set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT 1800)
+set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+set_tests_properties (H5TEST-big PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if (BUILD_SHARED_LIBS)
# Remove any output file left over from previous test run
@@ -603,25 +596,25 @@ if (BUILD_SHARED_LIBS)
)
set_tests_properties (H5TEST-shared-clear-objects PROPERTIES FIXTURES_SETUP shared_clear_objects)
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
- if ("${test}" STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-shared-${test}
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
+ if ("${h5_test}" STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-shared-${h5_test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
)
else ()
- add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
+ add_test (NAME H5TEST-shared-${h5_test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
+ -D "TEST_OUTPUT=${h5_test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (H5TEST-shared-${test} PROPERTIES
+ set_tests_properties (H5TEST-shared-${h5_test} PROPERTIES
FIXTURES_REQUIRED shared_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
@@ -629,10 +622,10 @@ if (BUILD_SHARED_LIBS)
endif ()
endforeach ()
- set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800)
- set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800)
- set_tests_properties (H5TEST-shared-btree2 PROPERTIES TIMEOUT 1800)
- set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ set_tests_properties (H5TEST-shared-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
#-- Adding test for cache
@@ -664,9 +657,10 @@ if (NOT CYGWIN)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
- set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
+if (TEST_CACHE_IMAGE)
#-- Adding test for cache_image
add_test (
NAME H5TEST-clear-cache_image-objects
@@ -683,6 +677,7 @@ set_tests_properties (H5TEST-cache_image PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
+endif ()
if (BUILD_SHARED_LIBS)
#-- Adding test for cache
@@ -714,7 +709,7 @@ if (BUILD_SHARED_LIBS)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
- set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
endif ()
@@ -1198,8 +1193,8 @@ if (HDF5_BUILD_GENERATORS)
gen_plist
)
- foreach (gen ${H5_GENERATORS})
- ADD_H5_GENERATOR (${gen})
+ foreach (h5_gen ${H5_GENERATORS})
+ ADD_H5_GENERATOR (${h5_gen})
endforeach ()
endif ()
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index be02110..791f75c 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -92,6 +92,7 @@ endif ()
set (H5_VFD_SKIP_TESTS
cache
+ cache_image
accum
fheap
big
@@ -110,33 +111,49 @@ endif ()
macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
- if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
+ if (NOT BUILD_SHARED_LIBS AND NOT HDF_CFG_NAME MATCHES "Debug")
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-${vfdtest}.out
+ ${vfdname}/${vfdname}-${vfdtest}.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
+ )
add_test (NAME VFD-${vfdname}-${test}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
@@ -152,64 +169,96 @@ endif ()
endif ()
endif ()
else ()
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-${vfdtest}.out
+ ${vfdname}/${vfdname}-${vfdtest}.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${test}-shared
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
+ )
+ add_test (NAME VFD-${vfdname}-${vfdtest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif ()
endif ()
else ()
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-${vfdtest}.out
+ ${vfdname}/${vfdname}-${vfdtest}.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
@@ -218,32 +267,48 @@ endif ()
endmacro ()
macro (DO_VFD_TEST vfdtest vfdname resultcode)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-${vfdtest}.out
+ ${vfdname}/${vfdname}-${vfdtest}.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
+ ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
+ )
add_test (NAME VFD-${vfdname}-${vfdtest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
@@ -251,60 +316,76 @@ endif ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS)
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_VFD_SKIP_TESTS)
if (WIN32)
- CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
+ CHECK_VFD_TEST (${h5_test} ${vfdname} ${resultcode})
else ()
- DO_VFD_TEST (${test} ${vfdname} ${resultcode})
+ DO_VFD_TEST (${h5_test} ${vfdname} ${resultcode})
endif ()
endif ()
endforeach ()
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if (NOT CYGWIN)
- set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
if (BUILD_SHARED_LIBS)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if (NOT CYGWIN AND NOT WIN32)
- set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
endif ()
if (HDF5_TEST_FHEAP_VFD)
+ add_test (
+ NAME VFD-${vfdname}-fheap-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-fheap.out
+ ${vfdname}/${vfdname}-fheap.out.err
+ )
add_test (NAME VFD-${vfdname}-fheap
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-fheap"
+ -D "TEST_OUTPUT=${vfdname}-fheap.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
- TIMEOUT 1800
+ DEPENDS VFD-${vfdname}-fheap-clear-objects
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-fheap-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}-shared/${vfdname}-fheap-shared.out
+ ${vfdname}-shared/${vfdname}-fheap-shared.out.err
+ )
add_test (NAME VFD-${vfdname}-fheap-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-fheap-shared"
+ -D "TEST_OUTPUT=${vfdname}-fheap-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
- TIMEOUT 1800
+ DEPENDS VFD-${vfdname}-fheap-shared-clear-objects
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
@@ -313,6 +394,6 @@ endif ()
endmacro ()
# Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
+ foreach (h5_vfd ${VFD_LIST})
+ ADD_VFD_TEST (${h5_vfd} 0)
endforeach ()
diff --git a/test/CMakeVOLTests.cmake b/test/CMakeVOLTests.cmake
index 39fa2a6..cf47291 100644
--- a/test/CMakeVOLTests.cmake
+++ b/test/CMakeVOLTests.cmake
@@ -89,6 +89,7 @@ endif ()
set (H5_VOL_SKIP_TESTS
cache
+ cache_image
accum
fheap
big
@@ -108,32 +109,48 @@ endif ()
if ("${voltest}" STREQUAL "flush1" OR "${voltest}" STREQUAL "flush2")
if ("${volname}" STREQUAL "multi" OR "${volname}" STREQUAL "split")
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
+ add_test (
+ NAME VOL-${volname}-${voltest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}/${volname}-${voltest}.out
+ ${volname}/${volname}-${voltest}.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_OUTPUT=${volname}-${voltest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if (BUILD_SHARED_LIBS)
- add_test (NAME VOL-${volname}-${test}-shared
+ add_test (
+ NAME VOL-${volname}-${voltest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}-shared/${volname}-${voltest}-shared.out
+ ${volname}-shared/${volname}-${voltest}-shared.out.err
+ )
+ add_test (NAME VOL-${volname}-${voltest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
)
@@ -143,70 +160,102 @@ endif ()
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}"
)
if (BUILD_SHARED_LIBS)
- add_test (NAME VOL-${volname}-${test}-shared
+ add_test (NAME VOL-${volname}-${voltest}-shared
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}-shared"
)
endif ()
endif ()
else ()
+ add_test (
+ NAME VOL-${volname}-${voltest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}/${volname}-${voltest}.out
+ ${volname}/${volname}-${voltest}.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_OUTPUT=${volname}-${voltest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if (BUILD_SHARED_LIBS)
- add_test (NAME VOL-${volname}-${test}-shared
+ add_test (
+ NAME VOL-${volname}-${voltest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}-shared/${volname}-${voltest}-shared.out
+ ${volname}-shared/${volname}-${voltest}-shared.out.err
+ )
+ add_test (NAME VOL-${volname}-${voltest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
)
endif ()
endif ()
else ()
+ add_test (
+ NAME VOL-${volname}-${voltest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}/${volname}-${voltest}.out
+ ${volname}/${volname}-${voltest}.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_OUTPUT=${volname}-${voltest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if (BUILD_SHARED_LIBS AND NOT "${voltest}" STREQUAL "cache")
+ add_test (
+ NAME VOL-${volname}-${voltest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}-shared/${volname}-${voltest}-shared.out
+ ${volname}-shared/${volname}-${voltest}-shared.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
)
@@ -216,32 +265,48 @@ endif ()
macro (DO_VOL_TEST voltest volname volinfo resultcode)
#message(STATUS "${voltest}-${volname} with ${volinfo}")
+ add_test (
+ NAME VOL-${volname}-${voltest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}/${volname}-${voltest}.out
+ ${volname}/${volname}-${voltest}.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_OUTPUT=${volname}-${voltest}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VOL-${volname}-${voltest}-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}-shared/${volname}-${voltest}-shared.out
+ ${volname}-shared/${volname}-${voltest}-shared.out.err
+ )
add_test (NAME VOL-${volname}-${voltest}-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
)
@@ -250,60 +315,76 @@ endif ()
macro (ADD_VOL_TEST volname volinfo resultcode)
#message(STATUS "volname=${volname} volinfo=${volinfo}")
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_VOL_SKIP_TESTS)
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_VOL_SKIP_TESTS)
if (WIN32)
- CHECK_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ CHECK_VOL_TEST (${h5_test} ${volname} "${volinfo}" ${resultcode})
else ()
- DO_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ DO_VOL_TEST (${h5_test} ${volname} "${volinfo}" ${resultcode})
endif ()
endif ()
endforeach ()
set_tests_properties (VOL-${volname}-flush2 PROPERTIES DEPENDS VOL-${volname}-flush1)
set_tests_properties (VOL-${volname}-flush1 PROPERTIES TIMEOUT 10)
set_tests_properties (VOL-${volname}-flush2 PROPERTIES TIMEOUT 10)
- set_tests_properties (VOL-${volname}-istore PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VOL-${volname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if (NOT CYGWIN)
- set_tests_properties (VOL-${volname}-cache PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VOL-${volname}-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
if (BUILD_SHARED_LIBS)
set_tests_properties (VOL-${volname}-flush2-shared PROPERTIES DEPENDS VOL-${volname}-flush1-shared)
set_tests_properties (VOL-${volname}-flush1-shared PROPERTIES TIMEOUT 10)
set_tests_properties (VOL-${volname}-flush2-shared PROPERTIES TIMEOUT 10)
- set_tests_properties (VOL-${volname}-istore-shared PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VOL-${volname}-istore-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
if (NOT CYGWIN AND NOT WIN32)
- set_tests_properties (VOL-${volname}-cache-shared PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VOL-${volname}-cache-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
endif ()
if (HDF5_TEST_FHEAP_VOL)
+ add_test (
+ NAME VOL-${volname}-fheap-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}/${volname}-fheap.out
+ ${volname}/${volname}-fheap.out.err
+ )
add_test (NAME VOL-${volname}-fheap
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-fheap"
+ -D "TEST_OUTPUT=${volname}-fheap.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-fheap PROPERTIES
- TIMEOUT 1800
+ DEPENDS VOL-${volname}-fheap-clear-objects
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VOL-${volname}-fheap-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${volname}-shared/${volname}-fheap-shared.out
+ ${volname}-shared/${volname}-fheap-shared.out.err
+ )
add_test (NAME VOL-${volname}-fheap-shared
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VOL:STRING=${volinfo}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${volname}-fheap-shared"
+ -D "TEST_OUTPUT=${volname}-fheap-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
)
set_tests_properties (VOL-${volname}-fheap-shared PROPERTIES
- TIMEOUT 1800
+ DEPENDS VOL-${volname}-fheap-shared-clear-objects
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
)
diff --git a/test/accum.c b/test/accum.c
index 7af353c..da90995 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -100,7 +100,7 @@ main(void)
/* Test Setup */
- puts("Testing the metadata accumulator");
+ HDputs("Testing the metadata accumulator");
/* File access property list */
h5_reset();
@@ -152,7 +152,7 @@ main(void)
if(nerrors)
goto error;
- puts("All metadata accumulator tests passed.");
+ HDputs("All metadata accumulator tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
@@ -160,7 +160,7 @@ main(void)
error:
if(api_ctx_pushed) H5CX_pop();
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
return 1;
} /* end main() */
diff --git a/test/app_ref.c b/test/app_ref.c
index 3ef3fef..a4853fa 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -83,8 +83,8 @@ Abrt_Handler (int H5_ATTR_UNUSED sig)
int i, n;
for (i=0; i<T_NUMCLASSES; i++) {
- fprintf(stderr, "%s ID reference count: %n", IDNAME[i], &n);
- fprintf(stderr, "%*d\n", (n < ERR_WIDTH) ? (ERR_WIDTH - n) : 0, rc[i]);
+ HDfprintf(stderr, "%s ID reference count: %n", IDNAME[i], &n);
+ HDfprintf(stderr, "%*d\n", (n < ERR_WIDTH) ? (ERR_WIDTH - n) : 0, rc[i]);
}
}
@@ -195,7 +195,7 @@ main (void)
error:
- puts("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
+ HDputs("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
return 1;
}
diff --git a/test/big.c b/test/big.c
index fe52aef..b3105eb 100644
--- a/test/big.c
+++ b/test/big.c
@@ -524,7 +524,7 @@ reader(char *filename, hid_t fapl)
}
if(zero) {
H5_FAILED();
- printf(" %d zero%s\n", zero, 1 == zero ? "" : "s");
+ HDprintf(" %d zero%s\n", zero, 1 == zero ? "" : "s");
} else if(wrong) {
SKIPPED();
HDputs(" Possible overlap with another region.");
@@ -765,7 +765,7 @@ main (int ac, char **av)
family_size_def = (hsize_t)HDstrtoull(*av, NULL, 0);
}
else{
- printf("***Missing fsize value***\n");
+ HDprintf("***Missing fsize value***\n");
usage();
return 1;
}
diff --git a/test/bittests.c b/test/bittests.c
index ccd725c..e29c188 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -57,13 +57,13 @@ test_find (void)
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
if(-1 != n) {
H5_FAILED();
- puts (" Zero length test failed (lsb)!");
+ HDputs (" Zero length test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE);
if(-1 != n) {
H5_FAILED();
- puts (" Zero length test failed (msb)!");
+ HDputs (" Zero length test failed (msb)!");
goto failed;
}
@@ -73,13 +73,13 @@ test_find (void)
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if(-1 != n) {
H5_FAILED();
- puts (" Zero buffer test failed (lsb)!");
+ HDputs (" Zero buffer test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
if(-1 != n) {
H5_FAILED();
- puts (" Zero buffer test failed (msb)!");
+ HDputs (" Zero buffer test failed (msb)!");
goto failed;
}
@@ -90,13 +90,13 @@ test_find (void)
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if((ssize_t)i != n) {
H5_FAILED();
- printf (" Test for set bit %d failed (lsb)!\n", i);
+ HDprintf (" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
if((ssize_t)i != n) {
H5_FAILED();
- printf (" Test for set bit %d failed (msb)!\n", i);
+ HDprintf (" Test for set bit %d failed (msb)!\n", i);
goto failed;
}
}
@@ -106,13 +106,13 @@ test_find (void)
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
if(-1 != n) {
H5_FAILED();
- puts (" One buffer test failed (lsb)!");
+ HDputs (" One buffer test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
if(-1 != n) {
H5_FAILED();
- puts (" One buffer test failed (msb)!");
+ HDputs (" One buffer test failed (msb)!");
goto failed;
}
@@ -123,13 +123,13 @@ test_find (void)
n = H5T__bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
if ((ssize_t)i!=n) {
H5_FAILED();
- printf (" Test for clear bit %d failed (lsb)!\n", i);
+ HDprintf (" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_MSB, FALSE);
if ((ssize_t)i!=n) {
H5_FAILED();
- printf (" Test for clear bit %d failed (lsb)!\n", i);
+ HDprintf (" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
}
@@ -139,9 +139,9 @@ test_find (void)
return 0;
failed:
- printf (" v = 0x");
- for (i=0; i<(int)sizeof(v1); i++) printf ("%02x", v1[i]);
- printf ("\n");
+ HDprintf (" v = 0x");
+ for (i=0; i<(int)sizeof(v1); i++) HDprintf ("%02x", v1[i]);
+ HDprintf ("\n");
return -1;
}
@@ -185,12 +185,12 @@ test_copy (void)
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
- puts (" Unabled to find copied region in destination");
+ HDputs (" Unabled to find copied region in destination");
goto failed;
}
if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
- puts (" Found copied bits when we shouldn't have");
+ HDputs (" Found copied bits when we shouldn't have");
goto failed;
}
@@ -199,25 +199,25 @@ test_copy (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
if (size>0 && n!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find first copied bit in destination "
+ HDprintf (" Unable to find first copied bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found copied bits and shouldn't have!");
+ HDputs (" Found copied bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
H5_FAILED();
- printf (" Unable to find last copied bit in destination "
+ HDprintf (" Unable to find last copied bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
H5_FAILED();
- puts (" High-order zeros are present and shouldn't be!");
+ HDputs (" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -228,25 +228,25 @@ test_copy (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
H5_FAILED();
- printf (" Unable to find last copied bit in destination "
+ HDprintf (" Unable to find last copied bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found copied bits but shouldn't have (reverse)!");
+ HDputs (" Found copied bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find beginning of copied data "
+ HDprintf (" Unable to find beginning of copied data "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
H5_FAILED();
- puts (" Found leading original data but shouldn't have!");
+ HDputs (" Found leading original data but shouldn't have!");
goto failed;
}
@@ -256,14 +256,14 @@ test_copy (void)
return 0;
failed:
- printf (" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n",
i, (unsigned long)s_offset, (unsigned long)d_offset,
(unsigned long)size);
- printf (" s = 0x");
- for (j=sizeof(v1)-1; j>=0; --j) printf ("%02x", v1[j]);
- printf ("\n d = 0x");
- for (j=sizeof(v2)-1; j>=0; --j) printf ("%02x", v2[j]);
- printf ("\n");
+ HDprintf (" s = 0x");
+ for (j=sizeof(v1)-1; j>=0; --j) HDprintf ("%02x", v1[j]);
+ HDprintf ("\n d = 0x");
+ for (j=sizeof(v2)-1; j>=0; --j) HDprintf ("%02x", v2[j]);
+ HDprintf ("\n");
return -1;
}
@@ -311,7 +311,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if(n != (ssize_t)offset + shift_dist) {
H5_FAILED();
- printf (" Unable to find first bit in destination "
+ HDprintf (" Unable to find first bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -323,7 +323,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n!=(ssize_t)(offset+size-1)) {
H5_FAILED();
- printf (" Unable to find last bit in destination "
+ HDprintf (" Unable to find last bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -338,7 +338,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n!=offset) {
H5_FAILED();
- printf (" Unable to find first bit in destination "
+ HDprintf (" Unable to find first bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -350,7 +350,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if(n != (ssize_t)(offset + size) - shift_dist - 1) {
H5_FAILED();
- printf (" Unable to find last bit in destination "
+ HDprintf (" Unable to find last bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -373,7 +373,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if (n >= 0) {
H5_FAILED();
- printf (" Unable to verify all bits are zero in destination(LSB) "
+ HDprintf (" Unable to verify all bits are zero in destination(LSB) "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -382,7 +382,7 @@ test_shift (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
- printf (" Unable to verify all bits are zero in destination(MSB) "
+ HDprintf (" Unable to verify all bits are zero in destination(MSB) "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -392,11 +392,11 @@ test_shift (void)
return 0;
failed:
- printf (" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n",
+ HDprintf (" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n",
i, (unsigned long)offset, (unsigned long)size,
(unsigned long)shift_dist);
- for (j=sizeof(vector)-1; j>=0; --j) printf ("%02x", vector[j]);
- printf ("\n");
+ for (j=sizeof(vector)-1; j>=0; --j) HDprintf ("%02x", vector[j]);
+ HDprintf ("\n");
return -1;
}
@@ -446,13 +446,13 @@ test_increment (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if (size!=1 && (size_t)n!=offset+size-1) {
H5_FAILED();
- printf (" Unable to find first bit in destination "
+ HDprintf (" Unable to find first bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if(size==1 && n>=0) {
H5_FAILED();
- printf (" Unable to verify all-zero bit in destination "
+ HDprintf (" Unable to verify all-zero bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -464,13 +464,13 @@ test_increment (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (size!=1 && n!=(ssize_t)(offset+size-1)) {
H5_FAILED();
- printf (" Unable to find last bit in destination "
+ HDprintf (" Unable to find last bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if(size==1 && n>=0) {
H5_FAILED();
- printf (" Unable to verify all-zero bit in destination "
+ HDprintf (" Unable to verify all-zero bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -480,10 +480,10 @@ test_increment (void)
return 0;
failed:
- printf (" i=%d, offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, offset=%lu, size=%lu\n",
i, (unsigned long)offset, (unsigned long)size);
- for (j=sizeof(vector)-1; j>=0; --j) printf ("%02x", vector[j]);
- printf ("\n");
+ for (j=sizeof(vector)-1; j>=0; --j) HDprintf ("%02x", vector[j]);
+ HDprintf ("\n");
return -1;
}
@@ -530,7 +530,7 @@ test_decrement (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n!=offset) {
H5_FAILED();
- printf (" Unable to find first bit in destination "
+ HDprintf (" Unable to find first bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -542,7 +542,7 @@ test_decrement (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n!=(ssize_t)(offset+size-1)) {
H5_FAILED();
- printf (" Unable to find last bit in destination "
+ HDprintf (" Unable to find last bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -552,10 +552,10 @@ test_decrement (void)
return 0;
failed:
- printf (" i=%d, offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, offset=%lu, size=%lu\n",
i, (unsigned long)offset, (unsigned long)size);
- for (j=sizeof(vector)-1; j>=0; --j) printf ("%02x", vector[j]);
- printf ("\n");
+ for (j=sizeof(vector)-1; j>=0; --j) HDprintf ("%02x", vector[j]);
+ HDprintf ("\n");
return -1;
}
@@ -602,7 +602,7 @@ test_negate (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n!=offset) {
H5_FAILED();
- printf (" Unable to find first bit in destination "
+ HDprintf (" Unable to find first bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -614,7 +614,7 @@ test_negate (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n!=(ssize_t)(offset+size-1)) {
H5_FAILED();
- printf (" Unable to find last bit in destination "
+ HDprintf (" Unable to find last bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -630,7 +630,7 @@ test_negate (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
if (n>=0) {
H5_FAILED();
- printf (" Unable to verify all-zero bits in destination "
+ HDprintf (" Unable to verify all-zero bits in destination "
"(n=%d)\n", (int)n);
goto failed;
}
@@ -642,7 +642,7 @@ test_negate (void)
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n>=0) {
H5_FAILED();
- printf (" Unable to verify all-zero bits in destination "
+ HDprintf (" Unable to verify all-zero bits in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
@@ -652,10 +652,10 @@ test_negate (void)
return 0;
failed:
- printf (" i=%d, offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, offset=%lu, size=%lu\n",
i, (unsigned long)offset, (unsigned long)size);
- for (j=sizeof(vector)-1; j>=0; --j) printf ("%02x", vector[j]);
- printf ("\n");
+ for (j=sizeof(vector)-1; j>=0; --j) HDprintf ("%02x", vector[j]);
+ HDprintf ("\n");
return -1;
}
@@ -697,12 +697,12 @@ test_set (void)
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
- puts (" Unabled to find set region in buffer");
+ HDputs (" Unabled to find set region in buffer");
goto failed;
}
if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
- puts (" Found set bits when we shouldn't have");
+ HDputs (" Found set bits when we shouldn't have");
goto failed;
}
@@ -711,25 +711,25 @@ test_set (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
if (size>0 && n!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find first set bit in destination "
+ HDprintf (" Unable to find first set bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found set bits and shouldn't have!");
+ HDputs (" Found set bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
H5_FAILED();
- printf (" Unable to find last set bit in destination "
+ HDprintf (" Unable to find last set bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
H5_FAILED();
- puts (" High-order zeros are present and shouldn't be!");
+ HDputs (" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -740,25 +740,25 @@ test_set (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
H5_FAILED();
- printf (" Unable to find last set bit in destination "
+ HDprintf (" Unable to find last set bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found set bits but shouldn't have (reverse)!");
+ HDputs (" Found set bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find beginning of set bit region "
+ HDprintf (" Unable to find beginning of set bit region "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
H5_FAILED();
- puts (" Found leading zeros but shouldn't have!");
+ HDputs (" Found leading zeros but shouldn't have!");
goto failed;
}
@@ -768,11 +768,11 @@ test_set (void)
return 0;
failed:
- printf (" i=%d, d_offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, d_offset=%lu, size=%lu\n",
i, (unsigned long)d_offset, (unsigned long)size);
- printf (" d = 0x");
- for (j=sizeof(v2)-1; j>=0; --j) printf ("%02x", v2[j]);
- printf ("\n");
+ HDprintf (" d = 0x");
+ for (j=sizeof(v2)-1; j>=0; --j) HDprintf ("%02x", v2[j]);
+ HDprintf ("\n");
return -1;
}
@@ -814,12 +814,12 @@ test_clear (void)
for (j=0; j<(int)sizeof(v2); j++) if (0xff!=v2[j]) break;
if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
- puts (" Unabled to find cleared region in buffer");
+ HDputs (" Unabled to find cleared region in buffer");
goto failed;
}
if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
- puts (" Found cleared bits when we shouldn't have");
+ HDputs (" Found cleared bits when we shouldn't have");
goto failed;
}
@@ -828,25 +828,25 @@ test_clear (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 0);
if (size>0 && n!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find first cleared bit in destination "
+ HDprintf (" Unable to find first cleared bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found cleared bits and shouldn't have!");
+ HDputs (" Found cleared bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 1);
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
H5_FAILED();
- printf (" Unable to find last cleared bit in destination "
+ HDprintf (" Unable to find last cleared bit in destination "
"(n=%d)\n", (int)n);
goto failed;
}
if (d_offset+size==8*sizeof(v2) && n>=0) {
H5_FAILED();
- puts (" High-order ones are present and shouldn't be!");
+ HDputs (" High-order ones are present and shouldn't be!");
goto failed;
}
@@ -857,25 +857,25 @@ test_clear (void)
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 0);
if (size>0 && (size_t)(n+1)!=d_offset+size) {
H5_FAILED();
- printf (" Unable to find last cleared bit in destination "
+ HDprintf (" Unable to find last cleared bit in destination "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==size && n>=0) {
H5_FAILED();
- puts (" Found cleared bits but shouldn't have (reverse)!");
+ HDputs (" Found cleared bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 1);
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
H5_FAILED();
- printf (" Unable to find beginning of cleared bit region "
+ HDprintf (" Unable to find beginning of cleared bit region "
"(reverse, n=%d)\n", (int)n);
goto failed;
}
if (0==d_offset && n>=0) {
H5_FAILED();
- puts (" Found leading ones but shouldn't have!");
+ HDputs (" Found leading ones but shouldn't have!");
goto failed;
}
@@ -885,11 +885,11 @@ test_clear (void)
return 0;
failed:
- printf (" i=%d, d_offset=%lu, size=%lu\n",
+ HDprintf (" i=%d, d_offset=%lu, size=%lu\n",
i, (unsigned long)d_offset, (unsigned long)size);
- printf (" d = 0x");
- for (j=sizeof(v2)-1; j>=0; --j) printf ("%02x", v2[j]);
- printf ("\n");
+ HDprintf (" d = 0x");
+ for (j=sizeof(v2)-1; j>=0; --j) HDprintf ("%02x", v2[j]);
+ HDprintf ("\n");
return -1;
}
@@ -928,11 +928,11 @@ main(void)
nerrors += test_negate() < 0 ? 1 : 0;
if(nerrors) {
- printf("***** %u FAILURE%s! *****\n",
+ HDprintf("***** %u FAILURE%s! *****\n",
nerrors, 1 == nerrors ? "" : "S");
exit(EXIT_FAILURE);
}
- printf("All bit tests passed.\n");
+ HDprintf("All bit tests passed.\n");
H5close();
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index 2edfe64..8de923e 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -58,6 +58,14 @@
#define OVERWRITE_CHUNK_NY 2
#define OVERWRITE_VALUE 42
+/* Test configurations */
+#define CONFIG_LATEST 0x01
+#define CONFIG_REOPEN_FILE 0x02
+#define CONFIG_REOPEN_DSET 0x04
+#define CONFIG_DIRECT_WRITE 0x08
+#define CONFIG_DIRECT_READ 0x10
+#define CONFIG_END 0x20
+
/* Defines used in test_single_chunk_latest() */
#define FILE "single_latest.h5"
#define DATASET "dataset"
@@ -1973,7 +1981,7 @@ error:
} /* test_read_unallocated_chunk() */
/*-------------------------------------------------------------------------
- * Function: test_single_chunk_latest
+ * Function: test_single_chunk
*
* Purpose: This is to verify the fix for jira issue HDFFV-10425.
* The problem was due to a bug in the internal ilbrary routine
@@ -1989,13 +1997,16 @@ error:
* index for the dataset.
* Verify that the data read is the same as the written data.
*
+ * Since expanded to test multiple combinations of cases
+ * involving a single chunk
+ *
* Return: Success: 0
* Failure: 1
*
*-------------------------------------------------------------------------
*/
static int
-test_single_chunk_latest(void)
+test_single_chunk(unsigned config)
{
hid_t fid; /* File ID */
hid_t fapl; /* File access property list ID */
@@ -2005,11 +2016,12 @@ test_single_chunk_latest(void)
hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */
hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */
hsize_t offset[2] = {0,0}; /* Offset for writing */
+ uint32_t filters; /* Filter mask out */
int wdata[DIM0][DIM1]; /* Write buffer */
int rdata[DIM0][DIM1]; /* Read buffer */
int i, j; /* Local index variable */
- TESTING("H5Dwrite_chunk with single chunk and latest format");
+ TESTING("Single chunk I/O");
/* Initialize data */
for (i=0; i<DIM0; i++) {
@@ -2020,8 +2032,9 @@ test_single_chunk_latest(void)
/* Create a new file with the latest format */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- goto error;
+ if(config & CONFIG_LATEST)
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
@@ -2039,37 +2052,57 @@ test_single_chunk_latest(void)
if((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- /* Write the data directly to the dataset */
- if(H5Dwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0*CHUNK1*4, (void *)wdata) < 0)
- goto error;
+ if(config & CONFIG_DIRECT_WRITE) {
+ /* Write the data directly to the dataset */
+ if(H5Dwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0*CHUNK1*4, (void *)wdata) < 0)
+ goto error;
+ } /* end if */
+ else
+ /* Write the data to the dataset */
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)wdata) < 0)
+ goto error;
/*
* Close and release resources.
*/
if(H5Pclose(dcpl) < 0)
goto error;
- if(H5Dclose(did) < 0)
- goto error;
+ if(config & CONFIG_REOPEN_DSET)
+ if(H5Dclose(did) < 0)
+ goto error;
if(H5Sclose(sid) < 0)
goto error;
if(H5Pclose(fapl) < 0)
goto error;
- if(H5Fclose(fid) < 0)
- goto error;
+ if(config & CONFIG_REOPEN_FILE)
+ if(H5Fclose(fid) < 0)
+ goto error;
/* Open the file and dataset with default properties */
- if((fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- goto error;
- if((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0)
- goto error;
+ if(config & CONFIG_REOPEN_FILE)
+ if((fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ goto error;
+ if(config & CONFIG_REOPEN_DSET)
+ if((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0)
+ goto error;
/* Retrieve dataset creation property list */
if((dcpl = H5Dget_create_plist(did)) < 0)
goto error;
- /* Read the data */
- if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
- goto error;
+ if(config & CONFIG_DIRECT_READ) {
+ /* Read the data directly */
+ if(H5Dread_chunk(did, H5P_DEFAULT, offset, &filters, rdata) < 0)
+ goto error;
+
+ /* Verify returned filter mask */
+ if(filters != 0)
+ goto error;
+ } /* end if */
+ else
+ /* Read the data */
+ if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
+ goto error;
/* Verify that the data read was correct. */
for (i = 0; i < DIM0; i++) {
@@ -2122,6 +2155,7 @@ error:
int main( void )
{
hid_t file_id;
+ unsigned config;
int nerrors=0;
/*
@@ -2149,7 +2183,53 @@ int main( void )
nerrors += test_read_unfiltered_dset(file_id);
nerrors += test_read_unallocated_chunk(file_id);
- nerrors += test_single_chunk_latest();
+ /* Loop over test configurations */
+ for(config = 0; config < CONFIG_END; config++) {
+ hbool_t need_comma = FALSE;
+
+ /* Check for invalid combinations */
+ if((config & CONFIG_REOPEN_FILE) && !(config & CONFIG_REOPEN_DSET))
+ continue;
+
+ /* Print configuration */
+ printf("Configuration: ");
+ if(config == 0)
+ printf("<empty>");
+ if(config & CONFIG_LATEST) {
+ if(need_comma)
+ printf(", ");
+ printf("latest format");
+ need_comma = TRUE;
+ } /* end if */
+ if(config & CONFIG_REOPEN_FILE) {
+ if(need_comma)
+ printf(", ");
+ printf("reopen file");
+ need_comma = TRUE;
+ } /* end if */
+ else if(config & CONFIG_REOPEN_DSET) {
+ if(need_comma)
+ printf(", ");
+ printf("reopen dataset");
+ need_comma = TRUE;
+ } /* end if */
+ if(config & CONFIG_DIRECT_WRITE) {
+ if(need_comma)
+ printf(", ");
+ printf("direct write");
+ need_comma = TRUE;
+ } /* end if */
+ if(config & CONFIG_DIRECT_READ) {
+ if(need_comma)
+ printf(", ");
+ printf("direct read");
+ need_comma = TRUE;
+ } /* end if */
+ printf(":\n");
+ fflush(stdout);
+
+ nerrors += test_single_chunk(config);
+ } /* end for */
if(H5Fclose(file_id) < 0)
goto error;
@@ -2165,3 +2245,4 @@ error:
HDputs("*** TESTS FAILED ***");
return EXIT_FAILURE;
}
+
diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake
index f66ee64..aa18c8a 100644
--- a/test/flushrefreshTest.cmake
+++ b/test/flushrefreshTest.cmake
@@ -53,7 +53,7 @@ if (TEST_ENV_VAR)
#message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
endif ()
-message(STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
+message (STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
execute_process (
COMMAND ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}
RESULT_VARIABLE SCRIPT_RESULT
@@ -61,34 +61,34 @@ execute_process (
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${TEST_FOLDER}
)
-message(STATUS "Background: ${SCRIPT_OUTPUT}")
-if (NOT "${SCRIPT_RESULT}" STREQUAL "0")
+message (STATUS "Background: ${SCRIPT_OUTPUT}")
+if (SCRIPT_RESULT)
message (FATAL_ERROR "Failed: The background script failed ${SCRIPT_RESULT}: ${SCRIPT_ERR}")
endif ()
-set(verification_done "0")
-while(verification_done LESS "1")
- message(STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+set (verification_done "0")
+while (verification_done LESS "1")
+ message (STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "1")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "1")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1} ${param2}
RESULT_VARIABLE TEST_RESULT
@@ -98,40 +98,40 @@ while(verification_done LESS "1")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "flush verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "flush verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The flush verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
-while(verification_done LESS "2")
- message(STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+while (verification_done LESS "2")
+ message (STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "2")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "2")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1}
RESULT_VARIABLE TEST_RESULT
@@ -141,22 +141,22 @@ while(verification_done LESS "2")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "refresh verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "refresh verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The refresh verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
diff --git a/test/h5test.c b/test/h5test.c
index dfa6a31..0ba28f3 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1270,7 +1270,7 @@ h5_set_info_object(void)
int ret_value=0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = getenv("HDF5_MPI_INFO")) != NULL){
+ if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL){
char *next, *valp;
valp = envp = next = HDstrdup(envp);
@@ -1332,7 +1332,7 @@ h5_set_info_object(void)
/* actually set the darned thing */
if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
- printf("MPI_Info_set failed\n");
+ HDprintf("MPI_Info_set failed\n");
ret_value = -1;
}
}
@@ -1508,9 +1508,9 @@ print_func(const char *format, ...)
va_list arglist;
int ret_value;
- va_start(arglist, format);
+ HDva_start(arglist, format);
ret_value = vprintf(format, arglist);
- va_end(arglist);
+ HDva_end(arglist);
return ret_value;
}
@@ -1595,7 +1595,7 @@ getenv_all(MPI_Comm comm, int root, const char* name)
int len;
static char* env = NULL;
- assert(name);
+ HDassert(name);
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
@@ -1603,7 +1603,7 @@ getenv_all(MPI_Comm comm, int root, const char* name)
if(mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(comm, &mpi_rank);
MPI_Comm_size(comm, &mpi_size);
- assert(root < mpi_size);
+ HDassert(root < mpi_size);
/* The root task does the getenv call
* and sends the result to the other tasks */
diff --git a/test/mount.c b/test/mount.c
index c6230ee..b7d2858 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -192,7 +192,7 @@ test_illegal(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Mounting a file on itself should have failed.");
+ HDputs(" Mounting a file on itself should have failed.");
TEST_ERROR
} /* end if */
@@ -208,7 +208,7 @@ test_illegal(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Mounting two files at one mount point should have failed.");
+ HDputs(" Mounting two files at one mount point should have failed.");
TEST_ERROR
} /* end if */
if(H5Funmount(mnt, ".") < 0) FAIL_STACK_ERROR
@@ -227,7 +227,7 @@ test_illegal(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Mounting same file opened twice at one mount point should have failed.");
+ HDputs(" Mounting same file opened twice at one mount point should have failed.");
TEST_ERROR
} /* end if */
if(H5Funmount(mnt, ".") < 0) FAIL_STACK_ERROR
@@ -240,7 +240,7 @@ test_illegal(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Creating a cycle with mount points should have failed.");
+ HDputs(" Creating a cycle with mount points should have failed.");
TEST_ERROR
} /* end if */
if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR
@@ -423,7 +423,7 @@ test_hide(hid_t fapl)
} H5E_END_TRY;
if(grp >= 0) {
H5_FAILED();
- puts(" Name is still accessible under mount point.");
+ HDputs(" Name is still accessible under mount point.");
TEST_ERROR
} /* end if */
@@ -434,7 +434,7 @@ test_hide(hid_t fapl)
if(H5Oget_info_by_name2(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
H5_FAILED();
- puts(" Hard link failed for hidden object.");
+ HDputs(" Hard link failed for hidden object.");
TEST_ERROR
} /* end if */
@@ -503,7 +503,7 @@ test_assoc(hid_t fapl)
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
H5_FAILED();
- puts(" Association failed.");
+ HDputs(" Association failed.");
TEST_ERROR
} /* end if */
@@ -628,7 +628,7 @@ test_move(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Moving an object across files should't have been possible");
+ HDputs(" Moving an object across files should't have been possible");
TEST_ERROR
} /* end if */
@@ -834,7 +834,7 @@ test_unlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Incorrect traversal from mount point!");
+ HDputs(" Incorrect traversal from mount point!");
TEST_ERROR
} /* end if */
@@ -851,7 +851,7 @@ test_unlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Traversal through mount point should not have worked!");
+ HDputs(" Traversal through mount point should not have worked!");
TEST_ERROR
} /* end if */
H5E_BEGIN_TRY {
@@ -859,7 +859,7 @@ test_unlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Traversal through mount point should not have worked!");
+ HDputs(" Traversal through mount point should not have worked!");
TEST_ERROR
} /* end if */
@@ -873,7 +873,7 @@ test_unlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- printf(" %d: Unmount by name should not have been allowed!\n",__LINE__);
+ HDprintf(" %d: Unmount by name should not have been allowed!\n",__LINE__);
TEST_ERROR
} /* end if */
H5E_BEGIN_TRY {
@@ -881,7 +881,7 @@ test_unlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- printf(" %d: Unmount by name should not have been allowed!\n",__LINE__);
+ HDprintf(" %d: Unmount by name should not have been allowed!\n",__LINE__);
TEST_ERROR
} /* end if */
if(H5Funmount(mnt, ".") < 0) FAIL_STACK_ERROR
@@ -1005,7 +1005,7 @@ test_interlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Interfile hard link should not have been allowed!");
+ HDputs(" Interfile hard link should not have been allowed!");
TEST_ERROR
} /* end if */
@@ -1015,7 +1015,7 @@ test_interlink(hid_t fapl)
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
- puts(" Interfile renaming should not have been allowed!");
+ HDputs(" Interfile renaming should not have been allowed!");
TEST_ERROR
} /* end if */
@@ -1033,7 +1033,7 @@ test_interlink(hid_t fapl)
} H5E_END_TRY;
if(dset >= 0) {
H5_FAILED();
- puts(" Dataset and shared type must be in the same file!");
+ HDputs(" Dataset and shared type must be in the same file!");
TEST_ERROR
} /* end if */
@@ -1172,7 +1172,7 @@ test_close(hid_t fapl)
if(H5Fclose(file1) < 0) FAIL_STACK_ERROR
if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
H5_FAILED();
- puts(" File1 contents are not accessible!");
+ HDputs(" File1 contents are not accessible!");
TEST_ERROR
} /* end if */
if(H5Fclose(file2) < 0) FAIL_STACK_ERROR
@@ -4379,13 +4379,13 @@ main(void)
if (nerrors) goto error;
- puts("All mount tests passed.");
+ HDputs("All mount tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- puts("***** MOUNT ERRORS *****");
+ HDputs("***** MOUNT ERRORS *****");
return 1;
}
diff --git a/test/objcopy.c b/test/objcopy.c
index eb4927f..4055781 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1167,7 +1167,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if((obj2_sid = H5Rget_region(parent2, H5R_DATASET_REGION, ref_buf2)) < 0) TEST_ERROR
/* Check if dataspaces are the same shape */
- if(H5S_select_shape_same_test(obj1_sid, obj2_sid) < 0) TEST_ERROR
+ if(H5S__select_shape_same_test(obj1_sid, obj2_sid) < 0) TEST_ERROR
/* Close dataspaces */
if(H5Sclose(obj1_sid) < 0) TEST_ERROR
@@ -2136,9 +2136,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
char src_fname[NAME_BUF_SIZE]; /* Name of source file */
char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
H5F_libver_t low, high; /* File format bounds */
- H5F_libver_t low_src, high_src; /* Source file format bounds */
unsigned srcdset_fillversion; /* Fill version of source dataset */
- hbool_t valid_high = FALSE; /* TRUE if high bound is valid */
int i, j; /* Local index variables */
H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
herr_t ret; /* Generic return value */
diff --git a/test/testframe.c b/test/testframe.c
index 335118c..97b2d1f 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, January 6, 2004
*
- * Purpose: Provides support functions for the testing framework.
+ * Purpose: Provides support functions for the testing framework.
*
*/
@@ -28,24 +28,25 @@
#define MAXTESTDESC 64
typedef struct TestStruct {
- int NumErrors;
- char Description[MAXTESTDESC];
- int SkipFlag;
- char Name[MAXTESTNAME];
- void (*Call)(void);
- void (*Cleanup)(void);
- const void *Parameters;
+ int NumErrors;
+ char Description[MAXTESTDESC];
+ int SkipFlag;
+ char Name[MAXTESTNAME];
+ void (*Call)(void);
+ void (*Cleanup)(void);
+ const void *Parameters;
} TestStruct;
/*
* Variables used by testing framework.
*/
+static int enable_error_stack = 0; /* enable error stack; disable=0 enable=1 */
static int num_errs = 0; /* Total number of errors during testing */
int TestVerbosity = VERBO_DEF; /* Default Verbosity is Low */
-static int Summary = 0; /* Show test summary. Default is no. */
-static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
-static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
+static int Summary = 0; /* Show test summary. Default is no. */
+static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
+static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
static TestStruct *Test = NULL; /* Array of tests */
static unsigned TestAlloc = 0; /* Size of the Test array */
static unsigned Index = 0;
@@ -54,7 +55,7 @@ static const char *TestProgName = NULL;
static void (*TestPrivateUsage)(void) = NULL;
static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
-
+
/*
* Setup a test function and add it to the list of tests.
* It must have no parameters and returns void.
@@ -74,12 +75,12 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
/* Sanity checking */
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n",
- TheDescr, MAXTESTDESC);
+ TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
} /* end if */
if (HDstrlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n",
- MAXTESTNAME);
+ MAXTESTNAME);
exit(EXIT_FAILURE);
} /* end if */
@@ -102,12 +103,12 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
/* Set up test function */
HDstrcpy(Test[Index].Description, TheDescr);
if(*TheName != '-') {
- HDstrcpy(Test[Index].Name, TheName);
- Test[Index].SkipFlag = 0;
+ HDstrcpy(Test[Index].Name, TheName);
+ Test[Index].SkipFlag = 0;
}
- else { /* skip test by default */
- HDstrcpy(Test[Index].Name, TheName+1);
- Test[Index].SkipFlag = 1;
+ else { /* skip test by default */
+ HDstrcpy(Test[Index].Name, TheName+1);
+ Test[Index].SkipFlag = 1;
}
Test[Index].Call = TheCall;
Test[Index].Cleanup = Cleanup;
@@ -118,7 +119,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
Index++;
}
-
+
/*
* Initialize testing framework
*
@@ -130,8 +131,8 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
* private options. Default to NULL which means none is provided.
*
* Modifications:
- * Albert Cheng 2004/08/17
- * Added the ProgName, private_usage and private_parser arguments.
+ * Albert Cheng 2004/08/17
+ * Added the ProgName, private_usage and private_parser arguments.
*/
void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_parser)(int ac, char *av[]))
{
@@ -140,7 +141,8 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
* half the functions this test calls are private, so automatic error
* reporting wouldn't do much good since it's triggered at the API layer.
*/
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+ if (enable_error_stack == 0)
+ H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
/*
* Record the program name and private routines if provided.
@@ -152,50 +154,50 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
TestPrivateParser = private_parser;
}
-
+
/*
* Print test usage.
- * First print the common test options, then the extra options if provided.
+ * First print the common test options, then the extra options if provided.
*
* Modification:
- * 2004/08/18 Albert Cheng. Add TestPrivateUsage feature.
+ * 2004/08/18 Albert Cheng. Add TestPrivateUsage feature.
*/
void TestUsage(void)
{
- unsigned i;
-
- print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
- TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
- print_func(" [-[e]x[clude] name]+ \n");
- print_func(" [-o[nly] name]+ \n");
- print_func(" [-b[egin] name] \n");
- print_func(" [-s[ummary]] \n");
- print_func(" [-c[leanoff]] \n");
- print_func(" [-h[elp]] \n");
- print_func("\n\n");
- print_func("verbose controls the amount of information displayed\n");
- print_func("exclude to exclude tests by name\n");
- print_func("only to name tests which should be run\n");
- print_func("begin start at the name of the test givin\n");
- print_func("summary prints a summary of test results at the end\n");
- print_func("cleanoff does not delete *.hdf files after execution of tests\n");
- print_func("help print out this information\n");
- if (TestPrivateUsage){
- print_func("\nExtra options\n");
- TestPrivateUsage();
- }
- print_func("\n\n");
- print_func("This program currently tests the following: \n\n");
- print_func("%16s %s\n", "Name", "Description");
- print_func("%16s %s\n", "----", "-----------");
-
- for (i = 0; i < Index; i++)
- print_func("%16s %s\n", Test[i].Name, Test[i].Description);
-
- print_func("\n\n");
+ unsigned i;
+
+ print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
+ TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
+ print_func(" [-[e]x[clude] name]+ \n");
+ print_func(" [-o[nly] name]+ \n");
+ print_func(" [-b[egin] name] \n");
+ print_func(" [-s[ummary]] \n");
+ print_func(" [-c[leanoff]] \n");
+ print_func(" [-h[elp]] \n");
+ print_func("\n\n");
+ print_func("verbose controls the amount of information displayed\n");
+ print_func("exclude to exclude tests by name\n");
+ print_func("only to name tests which should be run\n");
+ print_func("begin start at the name of the test givin\n");
+ print_func("summary prints a summary of test results at the end\n");
+ print_func("cleanoff does not delete *.hdf files after execution of tests\n");
+ print_func("help print out this information\n");
+ if (TestPrivateUsage){
+ print_func("\nExtra options\n");
+ TestPrivateUsage();
+ }
+ print_func("\n\n");
+ print_func("This program currently tests the following: \n\n");
+ print_func("%16s %s\n", "Name", "Description");
+ print_func("%16s %s\n", "----", "-----------");
+
+ for (i = 0; i < Index; i++)
+ print_func("%16s %s\n", Test[i].Name, Test[i].Description);
+
+ print_func("\n\n");
}
-
+
/*
* Print test info.
*/
@@ -209,7 +211,7 @@ void TestInfo(const char *ProgName)
print_func("Linked with hdf5 version %u.%u release %u\n", major, minor, release);
}
-
+
/*
* Parse command line information.
* argc, argv: the usual command line argument count and strings
@@ -218,7 +220,7 @@ void TestInfo(const char *ProgName)
* exit EXIT_FAILURE if error is encountered.
*
* Modification:
- * 2004/08/18 Albert Cheng. Add extra_parse feature.
+ * 2004/08/18 Albert Cheng. Add extra_parse feature.
*/
void TestParseCmdLine(int argc, char *argv[])
{
@@ -226,80 +228,82 @@ void TestParseCmdLine(int argc, char *argv[])
int ret_code;
while (argv++, --argc > 0){
- if ((HDstrcmp(*argv, "-verbose") == 0) ||
- (HDstrcmp(*argv, "-v") == 0)) {
- if (argc > 0){
- --argc; ++argv;
- ParseTestVerbosity(*argv);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
- }
- }
- else if (((HDstrcmp(*argv, "-exclude") == 0) ||
- (HDstrcmp(*argv, "-x") == 0))) {
- if (argc > 0){
- --argc; ++argv;
- SetTest(*argv, SKIPTEST);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
- }
- }
- else if (((HDstrcmp(*argv, "-begin") == 0) ||
- (HDstrcmp(*argv, "-b") == 0))) {
- if (argc > 0){
- --argc; ++argv;
- SetTest(*argv, BEGINTEST);
- }else{
- TestUsage();
- exit(EXIT_FAILURE);
- }
- }
- else if (((HDstrcmp(*argv, "-only") == 0) ||
- (HDstrcmp(*argv, "-o") == 0))) {
- if(argc > 0) {
- unsigned Loop;
-
- --argc; ++argv;
-
- /* Skip all tests, then activate only one. */
+ if ((HDstrcmp(*argv, "-verbose") == 0) ||
+ (HDstrcmp(*argv, "-v") == 0)) {
+ if (argc > 0){
+ --argc; ++argv;
+ ParseTestVerbosity(*argv);
+ }else{
+ TestUsage();
+ exit(EXIT_FAILURE);
+ }
+ }
+ else if (((HDstrcmp(*argv, "-exclude") == 0) ||
+ (HDstrcmp(*argv, "-x") == 0))) {
+ if (argc > 0){
+ --argc; ++argv;
+ SetTest(*argv, SKIPTEST);
+ }else{
+ TestUsage();
+ exit(EXIT_FAILURE);
+ }
+ }
+ else if (((HDstrcmp(*argv, "-begin") == 0) ||
+ (HDstrcmp(*argv, "-b") == 0))) {
+ if (argc > 0){
+ --argc; ++argv;
+ SetTest(*argv, BEGINTEST);
+ }else{
+ TestUsage();
+ exit(EXIT_FAILURE);
+ }
+ }
+ else if (((HDstrcmp(*argv, "-only") == 0) ||
+ (HDstrcmp(*argv, "-o") == 0))) {
+ if(argc > 0) {
+ unsigned Loop;
+
+ --argc; ++argv;
+
+ /* Skip all tests, then activate only one. */
if(!skipped_all) {
for(Loop = 0; Loop < Index; Loop++)
Test[Loop].SkipFlag = 1;
skipped_all = TRUE;
} /* end if */
- SetTest(*argv, ONLYTEST);
- } /* end if */
+ SetTest(*argv, ONLYTEST);
+ } /* end if */
else {
- TestUsage();
- exit(EXIT_FAILURE);
- }
- }
- else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
- Summary = 1;
- else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
- TestUsage();
- exit(EXIT_SUCCESS);
+ TestUsage();
+ exit(EXIT_FAILURE);
}
- else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
- SetTestNoCleanup();
- else {
- /* non-standard option. Break out. */
- break;
- }
+ }
+ else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
+ Summary = 1;
+ else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
+ enable_error_stack = 1;
+ else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
+ TestUsage();
+ exit(EXIT_SUCCESS);
+ }
+ else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
+ SetTestNoCleanup();
+ else {
+ /* non-standard option. Break out. */
+ break;
+ }
}
/* Call extra parsing function if provided. */
if (NULL != TestPrivateParser){
- ret_code=TestPrivateParser(argc+1, argv-1);
- if (ret_code != 0)
- exit(EXIT_FAILURE);
+ ret_code=TestPrivateParser(argc+1, argv-1);
+ if (ret_code != 0)
+ exit(EXIT_FAILURE);
}
}
-
+
/*
* Perform Tests.
*/
@@ -314,10 +318,10 @@ void PerformTests(void)
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
- Test_parameters = Test[Loop].Parameters;
- ALARM_ON;
+ Test_parameters = Test[Loop].Parameters;
+ ALARM_ON;
Test[Loop].Call();
- ALARM_OFF;
+ ALARM_OFF;
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
@@ -332,7 +336,7 @@ void PerformTests(void)
print_func("All tests were successful. \n\n");
}
-
+
/*
* Display test summary.
*/
@@ -354,7 +358,7 @@ void TestSummary(void)
print_func("\n\n");
}
-
+
/*
* Cleanup files from testing
*/
@@ -370,7 +374,7 @@ void TestCleanup(void)
Test[Loop].Cleanup();
}
-
+
/*
* Shutdown the test infrastructure
*/
@@ -380,7 +384,7 @@ void TestShutdown(void)
HDfree(Test);
}
-
+
/*
* Retrieve the verbosity level for the testing framework
*/
@@ -504,16 +508,16 @@ int SetTestNoCleanup(void)
void ParseTestVerbosity(char *argv)
{
if (*argv == 'l')
- SetTestVerbosity(VERBO_LO);
+ SetTestVerbosity(VERBO_LO);
else if (*argv == 'm')
- SetTestVerbosity(VERBO_MED);
+ SetTestVerbosity(VERBO_MED);
else if (*argv == 'h')
- SetTestVerbosity(VERBO_HI);
+ SetTestVerbosity(VERBO_HI);
else
- SetTestVerbosity(atoi(argv));
+ SetTestVerbosity(atoi(argv));
}
-
+
/*
* Retrieve the number of testing errors for the testing framework
*/
@@ -522,7 +526,7 @@ H5_ATTR_PURE int GetTestNumErrs(void)
return(num_errs);
}
-
+
/*
* Increment the number of testing errors
*/
@@ -531,7 +535,7 @@ void IncTestNumErrs(void)
num_errs++;
}
-
+
/*
* Retrieve the current Test Parameters pointer.
*/
@@ -540,7 +544,7 @@ H5_ATTR_PURE const void *GetTestParameters(void)
return(Test_parameters);
}
-
+
/*
* This routine is designed to provide equivalent functionality to 'printf'
* and also increment the error count for the testing framework.
@@ -563,7 +567,7 @@ TestErrPrintf(const char *format, ...)
return ret_value;
}
-
+
/*
* Set (control) which test will be tested.
* SKIPTEST: skip this test
@@ -576,41 +580,41 @@ void SetTest(const char *testname, int action)
unsigned Loop;
switch (action){
- case SKIPTEST:
- for (Loop = 0; Loop < Index; Loop++)
- if (HDstrcmp(testname, Test[Loop].Name) == 0){
- Test[Loop].SkipFlag = 1;
- break;
- }
- break;
- case BEGINTEST:
- for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) != 0)
- Test[Loop].SkipFlag = 1;
- else{
- /* Found it. Set it to run. Done. */
- Test[Loop].SkipFlag = 0;
- break;
- }
- }
- break;
- case ONLYTEST:
- for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
- /* Found it. Set it to run. Break to skip the rest. */
- Test[Loop].SkipFlag = 0;
- break;
- }
- }
- break;
- default:
- /* error */
- printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
- break;
+ case SKIPTEST:
+ for (Loop = 0; Loop < Index; Loop++)
+ if (HDstrcmp(testname, Test[Loop].Name) == 0){
+ Test[Loop].SkipFlag = 1;
+ break;
+ }
+ break;
+ case BEGINTEST:
+ for (Loop = 0; Loop < Index; Loop++) {
+ if (HDstrcmp(testname, Test[Loop].Name) != 0)
+ Test[Loop].SkipFlag = 1;
+ else{
+ /* Found it. Set it to run. Done. */
+ Test[Loop].SkipFlag = 0;
+ break;
+ }
+ }
+ break;
+ case ONLYTEST:
+ for (Loop = 0; Loop < Index; Loop++) {
+ if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ /* Found it. Set it to run. Break to skip the rest. */
+ Test[Loop].SkipFlag = 0;
+ break;
+ }
+ }
+ break;
+ default:
+ /* error */
+ printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
+ break;
}
}
-
+
/*
* Enable alarm on test execution, configurable by environment variable
*/
diff --git a/test/titerate.c b/test/titerate.c
index 5fad1b4..a3bbd65 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -116,7 +116,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_
return(count2 > 10 ? 1 : 0);
default:
- printf("invalid iteration command");
+ HDprintf("invalid iteration command");
return(-1);
} /* end switch */
} /* end liter_cb() */
@@ -163,7 +163,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(filespace, FAIL, "H5Screate");
for(i=0; i< NDATASETS; i++) {
- sprintf(name,"Dataset %d",i);
+ HDsprintf(name,"Dataset %d",i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
@@ -737,7 +737,7 @@ static void test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for(i = 0; i < NDATASETS; i++) {
- sprintf(name, "Dataset %d", i);
+ HDsprintf(name, "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
@@ -1077,6 +1077,6 @@ test_iterate(void)
void
cleanup_iterate(void)
{
- remove(DATAFILE);
+ HDremove(DATAFILE);
}
diff --git a/test/tselect.c b/test/tselect.c
index bcc2a5b..424c144 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1888,9 +1888,9 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S__select_shape_same_test(small_cube_sid,
file_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Read selection from disk */
ret = H5Dread(large_cube_dataset,
@@ -1965,9 +1965,9 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S__select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Read selection from disk */
@@ -2082,9 +2082,9 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
* memory slice through the cube selection and the
* on disk full small cube selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S__select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* write the slice from the in memory large cube to the on disk small cube */
@@ -2193,9 +2193,9 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
* on disk slice through the large cube selection
* as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S__select_shape_same_test(small_cube_sid,
file_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* write the cube from memory to the target slice of the disk cube */
@@ -2998,9 +2998,9 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(mem_small_cube_sid,
+ check = H5S__select_shape_same_test(mem_small_cube_sid,
file_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* zero the buffer that we will be using for reading */
HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
@@ -3105,9 +3105,9 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_small_cube_sid,
+ check = H5S__select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* zero out the in memory large cube */
@@ -3258,9 +3258,9 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_small_cube_sid,
+ check = H5S__select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* write the slice from the in memory large cube to the
@@ -3390,9 +3390,9 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_large_cube_sid,
+ check = H5S__select_shape_same_test(file_large_cube_sid,
mem_small_cube_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* write the checker board selection of the in memory
@@ -3525,13 +3525,13 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/****************************************************************
**
-** test_select_hyper_checker_board_dr(): Test H5S (dataspace)
-** selection code with checkerboard source and target having
+** test_select_hyper_checker_board_dr(): Test H5S (dataspace)
+** selection code with checkerboard source and target having
** different ranks but the same shape. We have already
-** tested H5S_shape_same in isolation, so now we try to do
+** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
-** This is just an initial smoke check, so we will work
+** This is just an initial smoke check, so we will work
** with a slice through a cube only.
**
****************************************************************/
@@ -4910,365 +4910,6 @@ test_select_hyper_union(void)
HDfree(rbuf);
} /* test_select_hyper_union() */
-#ifdef NEW_HYPERSLAB_API
-/****************************************************************
-**
-** test_select_hyper_union_stagger(): Test basic H5S (dataspace) selection code.
-** Tests unions of staggered hyperslabs. (Uses H5Scombine_hyperslab
-** and H5Sselect_select instead of H5Sselect_hyperslab)
-**
-****************************************************************/
-static void
-test_select_hyper_union_stagger(void)
-{
- hid_t file_id; /* File ID */
- hid_t dset_id; /* Dataset ID */
- hid_t dataspace; /* File dataspace ID */
- hid_t memspace; /* Memory dataspace ID */
- hid_t tmp_space; /* Temporary dataspace ID */
- hid_t tmp2_space; /* Another emporary dataspace ID */
- hsize_t dimsm[2]={7,7}; /* Memory array dimensions */
- hsize_t dimsf[2]={6,5}; /* File array dimensions */
- hsize_t count[2]={3,1}; /* 1st Hyperslab size */
- hsize_t count2[2]={3,1}; /* 2nd Hyperslab size */
- hsize_t count3[2]={2,1}; /* 3rd Hyperslab size */
- hssize_t offset[2]={0,0}; /* 1st Hyperslab offset */
- hssize_t offset2[2]={2,1}; /* 2nd Hyperslab offset */
- hssize_t offset3[2]={4,2}; /* 3rd Hyperslab offset */
- hsize_t count_out[2]={4,2}; /* Hyperslab size in memory */
- hssize_t offset_out[2]={0,3}; /* Hyperslab offset in memory */
- int data[6][5]; /* Data to write */
- int data_out[7][7]; /* Data read in */
- int input_loc[8][2]={{0,0},
- {1,0},
- {2,0},
- {2,1},
- {3,1},
- {4,1},
- {4,2},
- {5,2}};
- int output_loc[8][2]={{0,3},
- {0,4},
- {1,3},
- {1,4},
- {2,3},
- {2,4},
- {3,3},
- {3,4}};
- int dsetrank=2; /* File Dataset rank */
- int memrank=2; /* Memory Dataset rank */
- int i,j; /* Local counting variables */
- herr_t error;
- hsize_t stride[2]={1,1};
- hsize_t block[2]={1,1};
-
- /* Initialize data to write */
- for(i=0; i<6; i++)
- for(j=0; j<5; j++)
- data[i][j] = j*10 + i;
-
- /* Create file */
- file_id=H5Fcreate(FILENAME,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
- CHECK(file_id, FAIL, "H5Fcreate");
-
- /* Create File Dataspace */
- dataspace=H5Screate_simple(dsetrank,dimsf,NULL);
- CHECK(dataspace, FAIL, "H5Screate_simple");
-
- /* Create File Dataset */
- dset_id=H5Dcreate2(file_id,"IntArray",H5T_NATIVE_INT,dataspace,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset_id, FAIL, "H5Dcreate2");
-
- /* Write File Dataset */
- error=H5Dwrite(dset_id,H5T_NATIVE_INT,dataspace,dataspace,H5P_DEFAULT,data);
- CHECK(error, FAIL, "H5Dwrite");
-
- /* Close things */
- error=H5Sclose(dataspace);
- CHECK(error, FAIL, "H5Sclose");
- error = H5Dclose(dset_id);
- CHECK(error, FAIL, "H5Dclose");
- error = H5Fclose(file_id);
- CHECK(error, FAIL, "H5Fclose");
-
- /* Initialize intput buffer */
- memset(data_out, 0, 7 * 7 * sizeof(int));
-
- /* Open file */
- file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
- CHECK(file_id, FAIL, "H5Fopen");
-
- /* Open dataset */
- dset_id = H5Dopen2(file_id, "IntArray", H5P_DEFAULT);
- CHECK(dset_id, FAIL, "H5Dopen2");
-
- /* Get the dataspace */
- dataspace = H5Dget_space(dset_id);
- CHECK(dataspace, FAIL, "H5Dget_space");
-
- /* Select the hyperslabs */
- error = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block);
- CHECK(error, FAIL, "H5Sselect_hyperslab");
- tmp_space = H5Scombine_hyperslab(dataspace, H5S_SELECT_OR, offset2, stride, count2, block);
- CHECK(tmp_space, FAIL, "H5Scombine_hyperslab");
-
- /* Copy the file dataspace and select hyperslab */
- tmp2_space = H5Scopy(dataspace);
- CHECK(tmp2_space, FAIL, "H5Scopy");
- error=H5Sselect_hyperslab(tmp2_space,H5S_SELECT_SET,offset3,stride,count3,block);
- CHECK(error, FAIL, "H5Sselect_hyperslab");
-
- /* Combine the copied dataspace with the temporary dataspace */
- error=H5Sselect_select(tmp_space,H5S_SELECT_OR,tmp2_space);
- CHECK(error, FAIL, "H5Sselect_select");
-
- /* Create Memory Dataspace */
- memspace=H5Screate_simple(memrank,dimsm,NULL);
- CHECK(memspace, FAIL, "H5Screate_simple");
-
- /* Select hyperslab in memory */
- error=H5Sselect_hyperslab(memspace,H5S_SELECT_SET,offset_out,stride,count_out,block);
- CHECK(error, FAIL, "H5Sselect_hyperslab");
-
- /* Read File Dataset */
- error=H5Dread(dset_id,H5T_NATIVE_INT,memspace,tmp_space,H5P_DEFAULT,data_out);
- CHECK(error, FAIL, "H5Dread");
-
- /* Verify input data */
- for(i=0; i<8; i++) {
- if(data[input_loc[i][0]][input_loc[i][1]]!=data_out[output_loc[i][0]][output_loc[i][1]]) {
- printf("input data #%d is wrong!\n",i);
- printf("input_loc=[%d][%d]\n",input_loc[i][0],input_loc[i][1]);
- printf("output_loc=[%d][%d]\n",output_loc[i][0],output_loc[i][1]);
- printf("data=%d\n",data[input_loc[i][0]][input_loc[i][1]]);
- TestErrPrintf("data_out=%d\n",data_out[output_loc[i][0]][output_loc[i][1]]);
- } /* end if */
- } /* end for */
-
- /* Close things */
- error=H5Sclose(tmp2_space);
- CHECK(error, FAIL, "H5Sclose");
- error=H5Sclose(tmp_space);
- CHECK(error, FAIL, "H5Sclose");
- error=H5Sclose(dataspace);
- CHECK(error, FAIL, "H5Sclose");
- error=H5Sclose(memspace);
- CHECK(error, FAIL, "H5Sclose");
- error=H5Dclose(dset_id);
- CHECK(error, FAIL, "H5Dclose");
- error=H5Fclose(file_id);
- CHECK(error, FAIL, "H5Fclose");
-}
-
-/****************************************************************
-**
-** test_select_hyper_union_3d(): Test basic H5S (dataspace) selection code.
-** Tests unions of hyperslabs in 3-D (Uses H5Scombine_hyperslab
-** and H5Scombine_select instead of H5Sselect_hyperslab)
-**
-****************************************************************/
-static void
-test_select_hyper_union_3d(void)
-{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t tmp_space; /* Temporary Dataspace ID */
- hid_t tmp2_space; /* Another temporary Dataspace ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {SPACE4_DIM1, SPACE4_DIM2, SPACE4_DIM3};
- hsize_t dims3[] = {SPACE3_DIM1, SPACE3_DIM2};
- hsize_t start[SPACE1_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- struct row_list {
- size_t z;
- size_t y;
- size_t x;
- size_t l;
- } rows[]= { /* Array of x,y,z coordinates & length for each row written from memory */
- {0,0,0,6}, /* 1st face of 3-D object */
- {0,1,0,6},
- {0,2,0,6},
- {0,3,0,6},
- {0,4,0,6},
- {1,0,0,6}, /* 2nd face of 3-D object */
- {1,1,0,6},
- {1,2,0,6},
- {1,3,0,6},
- {1,4,0,6},
- {2,0,0,6}, /* 3rd face of 3-D object */
- {2,1,0,10},
- {2,2,0,10},
- {2,3,0,10},
- {2,4,0,10},
- {2,5,2,8},
- {2,6,2,8},
- {3,0,0,6}, /* 4th face of 3-D object */
- {3,1,0,10},
- {3,2,0,10},
- {3,3,0,10},
- {3,4,0,10},
- {3,5,2,8},
- {3,6,2,8},
- {4,0,0,6}, /* 5th face of 3-D object */
- {4,1,0,10},
- {4,2,0,10},
- {4,3,0,10},
- {4,4,0,10},
- {4,5,2,8},
- {4,6,2,8},
- {5,1,2,8}, /* 6th face of 3-D object */
- {5,2,2,8},
- {5,3,2,8},
- {5,4,2,8},
- {5,5,2,8},
- {5,6,2,8},
- {6,1,2,8}, /* 7th face of 3-D object */
- {6,2,2,8},
- {6,3,2,8},
- {6,4,2,8},
- {6,5,2,8},
- {6,6,2,8},
- {7,1,2,8}, /* 8th face of 3-D object */
- {7,2,2,8},
- {7,3,2,8},
- {7,4,2,8},
- {7,5,2,8},
- {7,6,2,8}};
- uint8_t *wbuf, /* buffer to write to disk */
- *rbuf, /* buffer read from disk */
- *tbuf, /* temporary buffer pointer */
- *tbuf2; /* temporary buffer pointer */
- int i,j,k; /* Counters */
- herr_t ret; /* Generic return value */
- hsize_t npoints; /* Number of elements in selection */
-
- /* Output message about test being performed */
- MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
-
- /* Allocate write & read buffers */
- wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK(wbuf, NULL, "HDmalloc");
- rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK(rbuf, NULL, "HDcalloc");
-
- /* Initialize write buffer */
- for(i=0, tbuf=wbuf; i<SPACE4_DIM1; i++)
- for(j=0; j<SPACE4_DIM2; j++)
- for(k=0; k<SPACE4_DIM3; k++)
- *tbuf++=(uint8_t)((((i*SPACE4_DIM2)+j)*SPACE4_DIM3)+k);
-
- /* Create file */
- fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fcreate");
-
-/* Test case of two blocks which overlap corners and must be split */
- /* Create dataspace for dataset on disk */
- sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
-
- /* Create dataspace for writing buffer */
- sid2 = H5Screate_simple(SPACE4_RANK, dims2, NULL);
- CHECK(sid2, FAIL, "H5Screate_simple");
-
- /* Select 2x15x13 hyperslab for disk dataset */
- start[0]=1; start[1]=0; start[2]=0;
- stride[0]=1; stride[1]=1; stride[2]=1;
- count[0]=2; count[1]=15; count[2]=13;
- block[0]=1; block[1]=1; block[2]=1;
- ret = H5Sselect_hyperslab(sid1,H5S_SELECT_SET,start,stride,count,block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
-
- /* Select 5x5x6 hyperslab for memory dataset */
- start[0]=0; start[1]=0; start[2]=0;
- stride[0]=1; stride[1]=1; stride[2]=1;
- count[0]=5; count[1]=5; count[2]=6;
- block[0]=1; block[1]=1; block[2]=1;
- ret = H5Sselect_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
-
- /* Union overlapping 15x20 hyperslab for memory dataset (forming a irregularly shaped region) */
- start[0]=2; start[1]=1; start[2]=2;
- stride[0]=1; stride[1]=1; stride[2]=1;
- count[0]=6; count[1]=6; count[2]=8;
- block[0]=1; block[1]=1; block[2]=1;
- tmp_space = H5Scombine_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block);
- CHECK(tmp_space, FAIL, "H5Sselect_hyperslab");
-
- /* Combine dataspaces and create new dataspace */
- tmp2_space = H5Scombine_select(sid2,H5S_SELECT_OR,tmp_space);
- CHECK(tmp2_space, FAIL, "H5Scombin_select");
-
- npoints = (hsize_t)H5Sget_select_npoints(tmp2_space);
- VERIFY(npoints, 15*26, "H5Sget_select_npoints");
-
- /* Create a dataset */
- dataset = H5Dcreate2(fid1, SPACE1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
-
- /* Write selection to disk */
- ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,tmp2_space,sid1,H5P_DEFAULT,wbuf);
- CHECK(ret, FAIL, "H5Dwrite");
-
- /* Close temporary dataspaces */
- ret = H5Sclose(tmp_space);
- CHECK(ret, FAIL, "H5Sclose");
- ret = H5Sclose(tmp2_space);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Close memory dataspace */
- ret = H5Sclose(sid2);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Create dataspace for reading buffer */
- sid2 = H5Screate_simple(SPACE3_RANK, dims3, NULL);
- CHECK(sid2, FAIL, "H5Screate_simple");
-
- /* Select 15x26 hyperslab for reading memory dataset */
- start[0]=0; start[1]=0;
- stride[0]=1; stride[1]=1;
- count[0]=15; count[1]=26;
- block[0]=1; block[1]=1;
- ret = H5Sselect_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
-
- /* Read selection from disk */
- ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,H5P_DEFAULT,rbuf);
- CHECK(ret, FAIL, "H5Dread");
-
- /* Compare data read with data written out */
- for(i=0,tbuf2=rbuf; i<(int)(sizeof(rows)/sizeof(struct row_list)); i++) {
- tbuf=wbuf+(rows[i].z*SPACE4_DIM3*SPACE4_DIM2)+(rows[i].y*SPACE4_DIM3)+rows[i].x;
- for(j=0; j<(int)rows[i].l; j++, tbuf++, tbuf2++) {
- if(*tbuf!=*tbuf2)
- TestErrPrintf("%d: hyperslab values don't match!, i=%d, j=%d, *tbuf=%d, *tbuf2=%d\n",__LINE__,i,j,(int)*tbuf,(int)*tbuf2);
- } /* end for */
- } /* end for */
-
- /* Close memory dataspace */
- ret = H5Sclose(sid2);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Close disk dataspace */
- ret = H5Sclose(sid1);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Close Dataset */
- ret = H5Dclose(dataset);
- CHECK(ret, FAIL, "H5Dclose");
-
- /* Close file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
-
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
-} /* test_select_hyper_union_3d() */
-#endif /* NEW_HYPERSLAB_API */
-
/****************************************************************
**
** test_select_hyper_and_2d(): Test basic H5S (dataspace) selection code.
@@ -5902,6 +5543,10 @@ test_select_hyper_union_random_5d(hid_t read_plist)
/* Select hyperslab */
ret = H5Sselect_hyperslab(sid1, (i == 0 ? H5S_SELECT_SET : H5S_SELECT_OR), start, NULL, count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ if(ret < 0) {
+ TestErrPrintf("Random hyperslabs for seed %u failed!\n", seed);
+ break;
+ } /* end if */
} /* end for */
/* Get the number of elements selected */
@@ -5920,14 +5565,18 @@ test_select_hyper_union_random_5d(hid_t read_plist)
/* Read selection from disk */
ret=H5Dread(dataset,H5T_NATIVE_INT,sid2,sid1,read_plist,rbuf);
CHECK(ret, FAIL, "H5Dread");
+ if(ret < 0) {
+ TestErrPrintf("Random hyperslabs for seed %u failed!\n", seed);
+ break;
+ } /* end if */
/* Compare data read with data written out */
tbuf=rbuf;
ret = H5Diterate(wbuf,H5T_NATIVE_INT,sid1,test_select_hyper_iter2,&tbuf);
- if(ret<0) {
- TestErrPrintf("Random hyperslabs for seed %u failed!\n",seed);
+ if(ret < 0) {
+ TestErrPrintf("Random hyperslabs for seed %u failed!\n", seed);
break;
- }
+ } /* end if */
/* Set the read buffer back to all zeroes */
HDmemset(rbuf, 0, (size_t)SPACE6_DIM1);
@@ -6214,9 +5863,6 @@ test_select_point_chunk(void)
herr_t ret; /* Generic return value */
unsigned *data_out; /* output buffer */
-#ifdef LATER
- unsigned *tmpdata_out; /* output buffer */
-#endif /* LATER */
hsize_t start[SPACE7_RANK]; /* hyperslab offset */
hsize_t count[SPACE7_RANK]; /* size of the hyperslab */
@@ -6585,7 +6231,7 @@ test_select_combine(void)
hsize_t dims[SPACE7_RANK]={SPACE7_DIM1,SPACE7_DIM2}; /* Dimensions of dataspace */
H5S_sel_type sel_type; /* Selection type */
hssize_t nblocks; /* Number of hyperslab blocks */
- hsize_t blocks[128][2][SPACE7_RANK]; /* List of blocks */
+ hsize_t blocks[16][2][SPACE7_RANK]; /* List of blocks */
herr_t error;
/* Output message about test being performed */
@@ -8087,290 +7733,290 @@ test_shape_same(void)
/* Compare "all" selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(all_sid,all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(all_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(all_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(all_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(all_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,single_hyper_all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(all_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(all_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare "none" selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(none_sid,none_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,none_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(none_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(none_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(none_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(none_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(none_sid,none_hyper_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid,none_hyper_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(none_sid, scalar_none_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare single point selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(single_pt_sid,single_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,single_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(single_pt_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(single_pt_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(single_pt_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(single_pt_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,single_hyper_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid, scalar_all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_pt_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(mult_pt_sid,mult_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,mult_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(mult_pt_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(mult_pt_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(mult_pt_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(mult_pt_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(mult_pt_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(mult_pt_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(single_hyper_sid,single_hyper_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,single_hyper_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(single_hyper_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(single_hyper_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(single_hyper_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(single_hyper_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8394,8 +8040,8 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8421,70 +8067,70 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,single_hyper_all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
#ifdef NOT_YET
/* In theory, these two selections are the same shape, but the
@@ -8508,8 +8154,8 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8535,129 +8181,129 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_all_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,single_hyper_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(single_hyper_pt_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,single_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,single_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_pt_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid, scalar_all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(single_hyper_pt_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(regular_hyper_sid,regular_hyper_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,regular_hyper_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Construct point selection which matches regular, strided hyperslab selection */
/* Create dataspace for point selection */
@@ -8674,8 +8320,8 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8700,8 +8346,8 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
@@ -8720,70 +8366,70 @@ test_shape_same(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(regular_hyper_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
- check=H5S_select_shape_same_test(irreg_hyper_sid,irreg_hyper_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,irreg_hyper_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid=H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check=H5S_select_shape_same_test(irreg_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Construct hyperslab selection which matches irregular hyperslab selection */
/* Create dataspace for hyperslab selection */
@@ -8808,141 +8454,141 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check=H5S_select_shape_same_test(irreg_hyper_sid,tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid,tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(irreg_hyper_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare scalar "all" dataspace with all selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(scalar_all_sid, scalar_all_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, scalar_all_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(scalar_all_sid, tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(scalar_all_sid, all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(scalar_all_sid, none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(scalar_all_sid, single_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, single_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(scalar_all_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, single_hyper_pt_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, single_hyper_pt_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, none_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, none_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against scalar "none" hyperslab selection */
- check = H5S_select_shape_same_test(scalar_all_sid, scalar_none_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_all_sid, scalar_none_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare scalar "none" dataspace with all selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(scalar_none_sid, scalar_none_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, scalar_none_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(scalar_none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(scalar_none_sid, tmp_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, tmp_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(scalar_none_sid, all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(scalar_none_sid, none_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, none_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(scalar_none_sid, single_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, single_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(scalar_none_sid, mult_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, mult_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, single_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, single_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, single_hyper_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, single_hyper_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, single_hyper_pt_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, single_hyper_pt_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, regular_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, regular_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, irreg_hyper_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, irreg_hyper_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, none_hyper_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, none_hyper_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
- check = H5S_select_shape_same_test(scalar_none_sid, scalar_all_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(scalar_none_sid, scalar_all_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Close dataspaces */
@@ -8974,27 +8620,27 @@ test_shape_same(void)
/****************************************************************
**
-** test_shape_same_dr__smoke_check_1():
+** test_shape_same_dr__smoke_check_1():
**
-** Create a square, 2 D data space (10 X 10), and select
+** Create a square, 2 D data space (10 X 10), and select
** all of it.
**
-** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
-** and select (10 X 10 X 1) hyper slabs in each, three with
-** the slab parallel to the xy plane, three parallel to the
+** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
+** and select (10 X 10 X 1) hyper slabs in each, three with
+** the slab parallel to the xy plane, three parallel to the
** xz plane, and three parallel to the yz plane.
**
-** Assuming that z is the fastest changing dimension,
-** H5S_select_shape_same() should return TRUE when comparing
-** the full 2 D space against any hyperslab parallel to the
-** yz plane in the 3 D space, and FALSE when comparing the
+** Assuming that z is the fastest changing dimension,
+** H5S_select_shape_same() should return TRUE when comparing
+** the full 2 D space against any hyperslab parallel to the
+** yz plane in the 3 D space, and FALSE when comparing the
** full 2 D space against the other two hyper slabs.
**
-** Also create two additional 3 D data spaces (10 X 10 X 10),
-** and select a (10 X 10 X 2) hyper slab parallel to the yz
-** axis in one of them, and two parallel (10 X 10 X 1) hyper
-** slabs parallel to the yz axis in the other.
-** H5S_select_shape_same() should return FALSE when comparing
+** Also create two additional 3 D data spaces (10 X 10 X 10),
+** and select a (10 X 10 X 2) hyper slab parallel to the yz
+** axis in one of them, and two parallel (10 X 10 X 1) hyper
+** slabs parallel to the yz axis in the other.
+** H5S_select_shape_same() should return FALSE when comparing
** each to the 2 D selection.
**
****************************************************************/
@@ -9183,42 +8829,42 @@ test_shape_same_dr__smoke_check_1(void)
/* setup is done -- run the tests: */
/* Compare against "xy" selection */
- check = H5S_select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "xz" selection */
- check = H5S_select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "yz" selection */
- check = H5S_select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_3_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_4_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_4_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Close dataspaces */
@@ -9265,9 +8911,9 @@ test_shape_same_dr__smoke_check_1(void)
/****************************************************************
**
-** test_shape_same_dr__smoke_check_2():
+** test_shape_same_dr__smoke_check_2():
**
-** Create a square, 2 D data space (10 X 10), and select
+** Create a square, 2 D data space (10 X 10), and select
** a "checker board" hyper slab as follows:
**
** * * - - * * - - * *
@@ -9281,27 +8927,27 @@ test_shape_same_dr__smoke_check_1(void)
** * * - - * * - - * *
** * * - - * * - - * *
**
-** where asterisks indicate selected elements, and dashes
+** where asterisks indicate selected elements, and dashes
** indicate unselected elements.
**
-** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
-** and select similar (10 X 10 X 1) checker board hyper
-** slabs in each, three with the slab parallel to the xy
-** plane, three parallel to the xz plane, and three parallel
+** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
+** and select similar (10 X 10 X 1) checker board hyper
+** slabs in each, three with the slab parallel to the xy
+** plane, three parallel to the xz plane, and three parallel
** to the yz plane.
**
-** Assuming that z is the fastest changing dimension,
-** H5S_select_shape_same() should return TRUE when comparing
-** the 2 D space checker board selection against a checker
-** board hyperslab parallel to the yz plane in the 3 D
-** space, and FALSE when comparing the 2 D checkerboard
-** selection against two hyper slabs parallel to the xy
+** Assuming that z is the fastest changing dimension,
+** H5S_select_shape_same() should return TRUE when comparing
+** the 2 D space checker board selection against a checker
+** board hyperslab parallel to the yz plane in the 3 D
+** space, and FALSE when comparing the 2 D checkerboard
+** selection against two hyper slabs parallel to the xy
** or xz planes.
**
-** Also create an additional 3 D data spaces (10 X 10 X 10),
-** and select a checker board parallel with the yz axis,
-** save with some squares being on different planes.
-** H5S_select_shape_same() should return FALSE when
+** Also create an additional 3 D data spaces (10 X 10 X 10),
+** and select a checker board parallel with the yz axis,
+** save with some squares being on different planes.
+** H5S_select_shape_same() should return FALSE when
** comparing this selection to the 2 D selection.
**
****************************************************************/
@@ -9584,7 +9230,7 @@ test_shape_same_dr__smoke_check_2(void)
start[0] = 4;
/* This test gets the right answer, but it fails the shape same
- * test in an unexpected point. Bring this up with Quincey, as
+ * test in an unexpected point. Bring this up with Quincey, as
* the oddness looks like it is not related to my code.
* -- JRM
*/
@@ -9596,39 +9242,39 @@ test_shape_same_dr__smoke_check_2(void)
/* setup is done -- run the tests: */
/* Compare against "xy" selection */
- check = H5S_select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "xz" selection */
- check = H5S_select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "yz" selection */
- check = H5S_select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_3_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_3_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Close dataspaces */
@@ -9673,9 +9319,9 @@ test_shape_same_dr__smoke_check_2(void)
/****************************************************************
**
-** test_shape_same_dr__smoke_check_3():
+** test_shape_same_dr__smoke_check_3():
**
-** Create a square, 2 D data space (10 X 10), and select an
+** Create a square, 2 D data space (10 X 10), and select an
** irregular hyper slab as follows:
**
** y
@@ -9691,22 +9337,22 @@ test_shape_same_dr__smoke_check_2(void)
** 0 - - - - - - - - - -
** 0 1 2 3 4 5 6 7 8 9 x
**
-** where asterisks indicate selected elements, and dashes
+** where asterisks indicate selected elements, and dashes
** indicate unselected elements.
**
-** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
-** and select similar irregular hyper slabs in each, three
-** with the slab parallel to the xy plane, three parallel
-** to the xz plane, and three parallel to the yz plane.
-** Further, translate the irregular slab in 2/3rds of the
+** Similarly, create nine, 3 D data spaces (10 X 10 X 10),
+** and select similar irregular hyper slabs in each, three
+** with the slab parallel to the xy plane, three parallel
+** to the xz plane, and three parallel to the yz plane.
+** Further, translate the irregular slab in 2/3rds of the
** cases.
**
-** Assuming that z is the fastest changing dimension,
-** H5S_select_shape_same() should return TRUE when
-** comparing the 2 D irregular hyperslab selection
-** against the irregular hyperslab selections parallel
-** to the yz plane in the 3 D space, and FALSE when
-** comparing it against the irregular hyper slabs
+** Assuming that z is the fastest changing dimension,
+** H5S_select_shape_same() should return TRUE when
+** comparing the 2 D irregular hyperslab selection
+** against the irregular hyperslab selections parallel
+** to the yz plane in the 3 D space, and FALSE when
+** comparing it against the irregular hyper slabs
** selections parallel to the xy or xz planes.
**
****************************************************************/
@@ -10119,36 +9765,36 @@ test_shape_same_dr__smoke_check_3(void)
/* setup is done -- run the tests: */
/* Compare against "xy" selection */
- check = H5S_select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xy_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "xz" selection */
- check = H5S_select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_0_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_1_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_xz_slice_2_sid, small_square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Compare against "yz" selection */
- check = H5S_select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_0_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_1_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(small_cube_yz_slice_2_sid, small_square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
/* Close dataspaces */
@@ -10190,9 +9836,9 @@ test_shape_same_dr__smoke_check_3(void)
/****************************************************************
**
-** test_shape_same_dr__smoke_check_4():
+** test_shape_same_dr__smoke_check_4():
**
-** Create a square, 2 D data space (10 X 10), and select
+** Create a square, 2 D data space (10 X 10), and select
** the entire space.
**
** Similarly, create 3 D and 4 D data spaces:
@@ -10213,7 +9859,7 @@ test_shape_same_dr__smoke_check_3(void)
** And select these entire spaces as well.
**
** Compare the 2 D space against all the other spaces
-** with H5S_select_shape_same(). The (1 X 10 X 10) &
+** with H5S_select_shape_same(). The (1 X 10 X 10) &
** (1 X 1 X 10 X 10) should return TRUE. All others
** should return FALSE.
**
@@ -10331,39 +9977,39 @@ test_shape_same_dr__smoke_check_4(void)
/* setup is done -- run the tests: */
- check = H5S_select_shape_same_test(three_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(three_d_space_0_sid, square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(three_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(three_d_space_1_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(three_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(three_d_space_2_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(three_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(three_d_space_3_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_0_sid, square_sid);
- VERIFY(check, TRUE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_0_sid, square_sid);
+ VERIFY(check, TRUE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_1_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_1_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_2_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_2_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_3_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_3_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_4_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_4_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_5_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_5_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
- check = H5S_select_shape_same_test(four_d_space_6_sid, square_sid);
- VERIFY(check, FALSE, "H5S_select_shape_same_test");
+ check = H5S__select_shape_same_test(four_d_space_6_sid, square_sid);
+ VERIFY(check, FALSE, "H5S__select_shape_same_test");
/* Close dataspaces */
@@ -10410,12 +10056,12 @@ test_shape_same_dr__smoke_check_4(void)
/****************************************************************
**
** test_shape_same_dr__full_space_vs_slice(): Tests selection
-** of a full n-cube data space vs an n-dimensional slice of
-** of an m-cube (m > n) in a call to H5S_select_shape_same().
-** Note that this test does not require the n-cube and the
+** of a full n-cube data space vs an n-dimensional slice of
+** of an m-cube (m > n) in a call to H5S_select_shape_same().
+** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5S_select_shape_same() should always return FALSE if
-** they don't).
+** H5S_select_shape_same() should always return FALSE if
+** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
** spaces.
@@ -10452,16 +10098,16 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
HDassert( large_rank <= SS_DR_MAX_RANK );
HDassert( 0 <= offset );
HDassert( offset < large_rank );
- HDassert( edge_size > 0 );
- HDassert( edge_size <= 1000 );
+ HDassert( edge_size > 0 );
+ HDassert( edge_size <= 1000 );
- sprintf(test_desc_0,
- "\tn-cube slice through m-cube (n <= m) test %d.\n",
+ sprintf(test_desc_0,
+ "\tn-cube slice through m-cube (n <= m) test %d.\n",
test_num);
MESSAGE(7, (test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- sprintf(test_desc_1,
+ sprintf(test_desc_1,
"\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
small_rank, large_rank, offset,
(int)dim_selected[0],
@@ -10526,7 +10172,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
/* setup is done -- run the test: */
- check = H5S_select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
+ check = H5S__select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
VERIFY(check, expected_result, "test_shape_same_dr__full_space_vs_slice");
@@ -10542,27 +10188,27 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
/****************************************************************
**
-** test_shape_same_dr__run_full_space_vs_slice_tests():
+** test_shape_same_dr__run_full_space_vs_slice_tests():
**
** Run the est_shape_same_dr__full_space_vs_slice() test
** over a variety of ranks and offsets.
**
-** At present, we test H5S_select_shape_same() with
+** At present, we test H5S_select_shape_same() with
** fully selected 1, 2, 3, and 4 cubes as one parameter, and
** 1, 2, 3, and 4 dimensional slices through a n-cube of rank
-** no more than 5 (and at least the rank of the slice).
-** We stop at rank 5, as Quincey suggested that it would be
+** no more than 5 (and at least the rank of the slice).
+** We stop at rank 5, as Quincey suggested that it would be
** sufficient.
**
-** All the n-cubes will have lengths of the same size, so
+** All the n-cubes will have lengths of the same size, so
** H5S_select_shape_same() should return true iff:
**
-** 1) the rank for the fully selected n cube equals the
+** 1) the rank for the fully selected n cube equals the
** number of dimensions selected in the slice through the
** m-cube (m >= n).
**
** 2) The dimensions selected in the slice through the m-cube
-** are the dimesnions with the most quickly changing
+** are the dimesnions with the most quickly changing
** indices.
**
****************************************************************/
@@ -10668,7 +10314,7 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
dim_selected,
expected_result
);
-
+
z++;
} while((z < 2) && (large_rank >= 1));
@@ -10691,15 +10337,15 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
/****************************************************************
**
-** test_shape_same_dr__checkerboard(): Tests selection of a
-** "checker board" subset of a full n-cube data space vs
+** test_shape_same_dr__checkerboard(): Tests selection of a
+** "checker board" subset of a full n-cube data space vs
** a "checker board" n-dimensional slice of an m-cube (m > n).
-** in a call to H5S_select_shape_same().
+** in a call to H5S_select_shape_same().
**
-** Note that this test does not require the n-cube and the
+** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5S_select_shape_same() should always return FALSE if
-** they don't).
+** H5S_select_shape_same() should always return FALSE if
+** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
** spaces.
@@ -10719,11 +10365,11 @@ test_shape_same_dr__checkerboard(int test_num,
char test_desc_1[128];
int i;
int dims_selected = 0;
- hid_t n_cube_0_sid; /* the checker board selected
- * hyper cube
+ hid_t n_cube_0_sid; /* the checker board selected
+ * hyper cube
*/
- hid_t n_cube_1_sid; /* the hyper cube in which a
- * checkerboard slice is selected
+ hid_t n_cube_1_sid; /* the hyper cube in which a
+ * checkerboard slice is selected
*/
hsize_t dims[SS_DR_MAX_RANK];
hsize_t base_start[2];
@@ -10745,8 +10391,8 @@ test_shape_same_dr__checkerboard(int test_num,
HDassert( small_rank <= large_rank );
HDassert( large_rank <= SS_DR_MAX_RANK );
HDassert( 0 < checker_size );
- HDassert( checker_size <= edge_size );
- HDassert( edge_size <= 1000 );
+ HDassert( checker_size <= edge_size );
+ HDassert( edge_size <= 1000 );
HDassert( 0 <= offset );
HDassert( offset < (int)edge_size );
@@ -10757,13 +10403,13 @@ test_shape_same_dr__checkerboard(int test_num,
HDassert( dims_selected >= 0 );
HDassert( dims_selected <= large_rank );
- sprintf(test_desc_0,
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n",
+ sprintf(test_desc_0,
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n",
test_num);
MESSAGE(7, (test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- sprintf(test_desc_1,
+ sprintf(test_desc_1,
"\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
small_rank, large_rank,
(int)edge_size, (int)checker_size,
@@ -10803,17 +10449,17 @@ test_shape_same_dr__checkerboard(int test_num,
* * * - - * * - - * *
* * * - - * * - - * *
*
- * In both cases, asterisks indicate selected elements,
+ * In both cases, asterisks indicate selected elements,
* and dashes indicate unselected elements.
*
* 3-D and 4-D ascii art is somewhat painful, so I'll
* leave those selections to your imagination. :-)
*
* Note, that since the edge_size and checker_size are
- * parameters that are passed in, the selection need
+ * parameters that are passed in, the selection need
* not look exactly like the selection shown above.
- * At present, the function allows checker sizes that
- * are not even divisors of the edge size -- thus
+ * At present, the function allows checker sizes that
+ * are not even divisors of the edge size -- thus
* something like the following is also possible:
*
* * * * - - - * * * -
@@ -10827,14 +10473,14 @@ test_shape_same_dr__checkerboard(int test_num,
* * * * - - - * * * -
* - - - * * * - - - *
*
- * As the above pattern can't be selected in one
+ * As the above pattern can't be selected in one
* call to H5Sselect_hyperslab(), and since the
* values in the start, stride, count, and block
- * arrays will be repeated over all entries in
+ * arrays will be repeated over all entries in
* the selected space case, and over all selected
* dimensions in the selected hyperslab case, we
- * compute these values first and store them in
- * in the base_start, base_stride, base_count,
+ * compute these values first and store them in
+ * in the base_start, base_stride, base_count,
* and base_block arrays.
*/
@@ -10844,9 +10490,9 @@ test_shape_same_dr__checkerboard(int test_num,
base_stride[0] = 2 * checker_size;
base_stride[1] = 2 * checker_size;
- /* Note that the following computation depends on the C99
- * requirement that integer division discard any fraction
- * (truncation towards zero) to function correctly. As we
+ /* Note that the following computation depends on the C99
+ * requirement that integer division discard any fraction
+ * (truncation towards zero) to function correctly. As we
* now require C99, this shouldn't be a problem, but noting
* it may save us some pain if we are ever obliged to support
* pre-C99 compilers again.
@@ -10863,7 +10509,7 @@ test_shape_same_dr__checkerboard(int test_num,
base_block[0] = checker_size;
base_block[1] = checker_size;
- /* now setup start, stride, count, and block arrays for
+ /* now setup start, stride, count, and block arrays for
* the first call to H5Sselect_hyperslab().
*/
for(i = 0; i < SS_DR_MAX_RANK; i++) {
@@ -10877,10 +10523,10 @@ test_shape_same_dr__checkerboard(int test_num,
start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* if small_rank == 1, or if edge_size == checker_size, we
+ /* if small_rank == 1, or if edge_size == checker_size, we
* are done, as either there is no added dimension in which
* to place offset selected "checkers".
- *
+ *
* Otherwise, set up start, stride, count and block, and
* make the additional selection.
*/
@@ -10900,7 +10546,7 @@ test_shape_same_dr__checkerboard(int test_num,
/* Wierdness alert:
*
- * Some how, it seems that selections can extend beyond the
+ * Some how, it seems that selections can extend beyond the
* boundaries of the target data space -- hence the following
* code to manually clip the selection back to the data space
* proper.
@@ -10923,8 +10569,8 @@ test_shape_same_dr__checkerboard(int test_num,
/* Now select the checkerboard selection in the (possibly larger) n-cube.
- *
- * Since we have already calculated the base start, stride, count,
+ *
+ * Since we have already calculated the base start, stride, count,
* and block, re-use the values in setting up start, stride, count,
* and block.
*/
@@ -10968,10 +10614,10 @@ test_shape_same_dr__checkerboard(int test_num,
start_ptr, stride_ptr, count_ptr, block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* As before, if the number of dimensions selected is less than or
- * equal to 1, or if edge_size == checker_size, we are done, as
- * either there is no added dimension in which to place offset selected
- * "checkers", or the hyperslab is completely occupied by one
+ /* As before, if the number of dimensions selected is less than or
+ * equal to 1, or if edge_size == checker_size, we are done, as
+ * either there is no added dimension in which to place offset selected
+ * "checkers", or the hyperslab is completely occupied by one
* "checker".
*
* Otherwise, set up start, stride, count and block, and
@@ -11001,7 +10647,7 @@ test_shape_same_dr__checkerboard(int test_num,
/* Wierdness alert:
*
- * Again, it seems that selections can extend beyond the
+ * Again, it seems that selections can extend beyond the
* boundaries of the target data space -- hence the following
* code to manually clip the selection back to the data space
* proper.
@@ -11018,7 +10664,7 @@ test_shape_same_dr__checkerboard(int test_num,
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* setup is done -- run the test: */
- check = H5S_select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
+ check = H5S__select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
VERIFY(check, expected_result, "test_shape_same_dr__checkerboard");
@@ -11034,23 +10680,23 @@ test_shape_same_dr__checkerboard(int test_num,
/****************************************************************
**
-** test_shape_same_dr__run_checkerboard_tests():
+** test_shape_same_dr__run_checkerboard_tests():
**
-** In this set of tests, we test H5S_select_shape_same()
-** with a "checkerboard" selection of 1, 2, 3, and 4 cubes as
-** one parameter, and 1, 2, 3, and 4 dimensional checkerboard
-** slices through a n-cube of rank no more than 5 (and at
-** least the rank of the slice).
+** In this set of tests, we test H5S_select_shape_same()
+** with a "checkerboard" selection of 1, 2, 3, and 4 cubes as
+** one parameter, and 1, 2, 3, and 4 dimensional checkerboard
+** slices through a n-cube of rank no more than 5 (and at
+** least the rank of the slice).
**
-** All the n-cubes will have lengths of the same size, so
+** All the n-cubes will have lengths of the same size, so
** H5S_select_shape_same() should return true iff:
**
-** 1) the rank of the n cube equals the number of dimensions
-** selected in the checker board slice through the m-cube
+** 1) the rank of the n cube equals the number of dimensions
+** selected in the checker board slice through the m-cube
** (m >= n).
**
-** 2) The dimensions selected in the checkerboard slice
-** through the m-cube are the dimensions with the most
+** 2) The dimensions selected in the checkerboard slice
+** through the m-cube are the dimensions with the most
** quickly changing indices.
**
****************************************************************/
@@ -11101,7 +10747,7 @@ test_shape_same_dr__run_checkerboard_tests(void)
dim_selected[4] = FALSE;
else
dim_selected[4] = TRUE;
-
+
/* compute the expected result: */
i = 0;
@@ -11305,17 +10951,17 @@ test_shape_same_dr__run_checkerboard_tests(void)
/****************************************************************
**
-** test_shape_same_dr__irregular():
+** test_shape_same_dr__irregular():
**
-** Tests selection of an "irregular" subset of a full
+** Tests selection of an "irregular" subset of a full
** n-cube data space vs an identical "irregular" subset
** of an n-dimensional slice of an m-cube (m > n).
-** in a call to H5S_select_shape_same().
+** in a call to H5S_select_shape_same().
**
-** Note that this test does not require the n-cube and the
+** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5S_select_shape_same() should always return FALSE if
-** they don't).
+** H5S_select_shape_same() should always return FALSE if
+** they don't).
**
****************************************************************/
static void
@@ -11337,7 +10983,7 @@ test_shape_same_dr__irregular(int test_num,
hid_t n_cube_0_sid; /* the hyper cube containing
* an irregular selection
*/
- hid_t n_cube_1_sid; /* the hyper cube in which a
+ hid_t n_cube_1_sid; /* the hyper cube in which a
* slice contains an irregular
* selection.
*/
@@ -11373,7 +11019,7 @@ test_shape_same_dr__irregular(int test_num,
hsize_t clip_block[SS_DR_MAX_RANK] = {10, 10, 10, 10, 10};
- hsize_t *(starts[SS_DR_MAX_RANK]) =
+ hsize_t *(starts[SS_DR_MAX_RANK]) =
{start_0, start_1, start_2, start_3, start_4};
hsize_t *(strides[SS_DR_MAX_RANK]) =
{stride_0, stride_1, stride_2, stride_3, stride_4};
@@ -11396,8 +11042,8 @@ test_shape_same_dr__irregular(int test_num,
HDassert( 0 < small_rank );
HDassert( small_rank <= large_rank );
HDassert( large_rank <= SS_DR_MAX_RANK );
- HDassert( 9 <= edge_size );
- HDassert( edge_size <= 1000 );
+ HDassert( 9 <= edge_size );
+ HDassert( edge_size <= 1000 );
HDassert( 0 <= slice_offset );
HDassert( slice_offset < edge_size );
HDassert( -2 <= pattern_offset );
@@ -11410,16 +11056,16 @@ test_shape_same_dr__irregular(int test_num,
HDassert( dims_selected >= 0 );
HDassert( dims_selected <= large_rank );
- sprintf(test_desc_0,
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n",
+ sprintf(test_desc_0,
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n",
test_num);
MESSAGE(7, (test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- sprintf(test_desc_1,
+ sprintf(test_desc_1,
"\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n",
small_rank, large_rank,
- edge_size,
+ edge_size,
slice_offset, pattern_offset,
(int)dim_selected[0],
(int)dim_selected[1],
@@ -11438,11 +11084,11 @@ test_shape_same_dr__irregular(int test_num,
CHECK(n_cube_0_sid, FAIL, "H5Screate_simple");
/* Select an "irregular" pattern in the small n-cube. This
- * pattern can be though of a set of four 3 x 2 x 2 X 2
- * four dimensional prisims, each parallel to one of the
- * axies and none of them intersecting with the other.
+ * pattern can be though of a set of four 3 x 2 x 2 X 2
+ * four dimensional prisims, each parallel to one of the
+ * axies and none of them intersecting with the other.
*
- * In the lesser dimensional cases, this 4D pattern is
+ * In the lesser dimensional cases, this 4D pattern is
* projected onto the lower dimensional space.
*
* In the 1-D case, the projection of the pattern looks
@@ -11467,12 +11113,12 @@ test_shape_same_dr__irregular(int test_num,
* 0 - - - - - - - - - -
* 0 1 2 3 4 5 6 7 8 9 x
*
- * In both cases, asterisks indicate selected elements,
+ * In both cases, asterisks indicate selected elements,
* and dashes indicate unselected elements.
*
* Note that is this case, since the edge size is fixed,
- * the pattern does not change. However, we do use the
- * displacement parameter to allow it to be moved around
+ * the pattern does not change. However, we do use the
+ * displacement parameter to allow it to be moved around
* within the n-cube or hyper slab.
*/
@@ -11487,7 +11133,7 @@ test_shape_same_dr__irregular(int test_num,
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end for */
- /* finally, clip the selection to ensure that it lies fully
+ /* finally, clip the selection to ensure that it lies fully
* within the n-cube.
*/
ret = H5Sselect_hyperslab(n_cube_0_sid, H5S_SELECT_AND,
@@ -11526,8 +11172,8 @@ test_shape_same_dr__irregular(int test_num,
/* Now select the irregular selection in the (possibly larger) n-cube.
- *
- * Basic idea is to project the pattern used in the smaller n-cube
+ *
+ * Basic idea is to project the pattern used in the smaller n-cube
* onto the dimensions selected in the larger n-cube, with the displacement
* specified.
*/
@@ -11564,7 +11210,7 @@ test_shape_same_dr__irregular(int test_num,
/* setup is done -- run the test: */
- check = H5S_select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
+ check = H5S__select_shape_same_test(n_cube_0_sid, n_cube_1_sid);
VERIFY(check, expected_result, "test_shape_same_dr__checkerboard");
@@ -11580,25 +11226,25 @@ test_shape_same_dr__irregular(int test_num,
/****************************************************************
**
-** test_shape_same_dr__run_irregular_tests():
+** test_shape_same_dr__run_irregular_tests():
**
-** In this set of tests, we test H5S_select_shape_same()
-** with an "irregular" subselection of 1, 2, 3, and 4 cubes as
-** one parameter, and irregular subselections of 1, 2, 3,
-** and 4 dimensional slices through a n-cube of rank no more
-** than 5 (and at least the rank of the slice) as the other.
-** Note that the "irregular" selection may be offset between
+** In this set of tests, we test H5S_select_shape_same()
+** with an "irregular" subselection of 1, 2, 3, and 4 cubes as
+** one parameter, and irregular subselections of 1, 2, 3,
+** and 4 dimensional slices through a n-cube of rank no more
+** than 5 (and at least the rank of the slice) as the other.
+** Note that the "irregular" selection may be offset between
** the n-cube and the slice.
**
** All the irregular selections will be identical (modulo rank)
** so H5S_select_shape_same() should return true iff:
**
-** 1) the rank of the n cube equals the number of dimensions
-** selected in the irregular slice through the m-cube
+** 1) the rank of the n cube equals the number of dimensions
+** selected in the irregular slice through the m-cube
** (m >= n).
**
-** 2) The dimensions selected in the irregular slice
-** through the m-cube are the dimensions with the most
+** 2) The dimensions selected in the irregular slice
+** through the m-cube are the dimensions with the most
** quickly changing indices.
**
****************************************************************/
@@ -11649,7 +11295,7 @@ test_shape_same_dr__run_irregular_tests(void)
dim_selected[4] = FALSE;
else
dim_selected[4] = TRUE;
-
+
/* compute the expected result: */
i = 0;
@@ -11795,8 +11441,8 @@ test_shape_same_dr__run_irregular_tests(void)
/****************************************************************
**
-** test_shape_same_dr(): Tests selections on dataspace with
-** different ranks, to verify that "shape same" routine
+** test_shape_same_dr(): Tests selections on dataspace with
+** different ranks, to verify that "shape same" routine
** is now handling this case correctly.
**
****************************************************************/
@@ -11913,8 +11559,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_reg1);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_reg1);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -11922,7 +11568,7 @@ test_space_rebuild(void)
}
else {
/* In this case, rebuild_check should be TRUE. */
- rebuild_check = H5S_select_shape_same_test(sid_reg1,sid_reg_ori1);
+ rebuild_check = H5S__select_shape_same_test(sid_reg1,sid_reg_ori1);
CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
}
@@ -11945,7 +11591,7 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_irreg1);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_irreg1);
assert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
@@ -11992,8 +11638,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_reg2);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_reg2);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12001,7 +11647,7 @@ test_space_rebuild(void)
}
else {
/* In this case, rebuild_check should be TRUE. */
- rebuild_check = H5S_select_shape_same_test(sid_reg2,sid_reg_ori2);
+ rebuild_check = H5S__select_shape_same_test(sid_reg2,sid_reg_ori2);
CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
}
@@ -12029,8 +11675,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_irreg2);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_irreg2);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
@@ -12081,8 +11727,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_reg3);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_reg3);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
@@ -12091,7 +11737,7 @@ test_space_rebuild(void)
}
else {
/* In this case, rebuild_check should be TRUE. */
- rebuild_check = H5S_select_shape_same_test(sid_reg3,sid_reg_ori3);
+ rebuild_check = H5S__select_shape_same_test(sid_reg3,sid_reg_ori3);
CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
}
@@ -12124,8 +11770,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_irreg3);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_irreg3);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
@@ -12184,8 +11830,8 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_reg4);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_reg4);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12193,7 +11839,7 @@ test_space_rebuild(void)
}
else {
/* In this case, rebuild_check should be TRUE. */
- rebuild_check = H5S_select_shape_same_test(sid_reg4,sid_reg_ori4);
+ rebuild_check = H5S__select_shape_same_test(sid_reg4,sid_reg_ori4);
CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
}
@@ -12237,8 +11883,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_irreg4);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_irreg4);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
@@ -12301,8 +11947,8 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_reg5);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_reg5);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12310,7 +11956,7 @@ test_space_rebuild(void)
}
else {
/* In this case, rebuild_check should be TRUE. */
- rebuild_check = H5S_select_shape_same_test(sid_reg5,sid_reg_ori5);
+ rebuild_check = H5S__select_shape_same_test(sid_reg5,sid_reg_ori5);
CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
}
@@ -12359,8 +12005,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_irreg5);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_irreg5);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
@@ -12400,7 +12046,7 @@ test_space_rebuild(void)
ret = H5Sselect_hyperslab(sid_spec,H5S_SELECT_SET,start5,stride5,count5,block5);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_spec);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_spec);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12422,8 +12068,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = TRUE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_spec);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_spec);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
@@ -12445,8 +12091,8 @@ test_space_rebuild(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
rebuild_stat = FALSE;
- rebuild_stat = H5S_get_rebuild_status_test(sid_spec);
- assert(rebuild_stat!=FAIL);
+ rebuild_stat = H5S__get_rebuild_status_test(sid_spec);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12861,9 +12507,9 @@ test_select_bounds(void)
/* Get bounds for 'none' selection */
H5E_BEGIN_TRY {
ret = H5Sget_select_bounds(sid, low_bounds, high_bounds);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sget_select_bo unds");
-
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Sget_select_bo unds");
+
/* Set point selection */
coord[0][0] = 3; coord[0][1] = 3;
coord[1][0] = 3; coord[1][1] = 96;
@@ -13040,14 +12686,14 @@ test_hyper_regular(void)
/* Query if 'all' selection is regular hyperslab (should fail) */
H5E_BEGIN_TRY {
is_regular = H5Sis_regular_hyperslab(sid);
- } H5E_END_TRY;
- VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY {
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set 'none' selection */
ret = H5Sselect_none(sid);
@@ -13056,14 +12702,14 @@ test_hyper_regular(void)
/* Query if 'none' selection is regular hyperslab (should fail) */
H5E_BEGIN_TRY {
is_regular = H5Sis_regular_hyperslab(sid);
- } H5E_END_TRY;
- VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY {
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set point selection */
coord[0][0] = 3; coord[0][1] = 3; coord[0][2] = 3;
@@ -13076,14 +12722,14 @@ test_hyper_regular(void)
/* Query if 'point' selection is regular hyperslab (should fail) */
H5E_BEGIN_TRY {
is_regular = H5Sis_regular_hyperslab(sid);
- } H5E_END_TRY;
- VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY {
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set "regular" hyperslab selection */
start[0] = 2; start[1] = 2; start[2] = 2;
@@ -13095,7 +12741,7 @@ test_hyper_regular(void)
/* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -13121,13 +12767,13 @@ test_hyper_regular(void)
/* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
H5E_BEGIN_TRY {
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* 'XOR' in the point again, to remove it, which should make it regular again */
t_start[0] = 0; t_start[1] = 0; t_start[2] = 0;
@@ -13137,7 +12783,7 @@ test_hyper_regular(void)
/* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */
is_regular = H5Sis_regular_hyperslab(sid);
- VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
+ VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab");
/* Retrieve the hyperslab parameters */
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
@@ -13661,10 +13307,6 @@ test_select(void)
test_select_hyper_offset2();/* Test more selection offset code with hyperslabs */
test_select_point_offset(); /* Test selection offset code with elements */
test_select_hyper_union(); /* Test hyperslab union code */
-#ifdef NEW_HYPERSLAB_API
- test_select_hyper_union_stagger(); /* Test hyperslab union code for staggered slabs */
- test_select_hyper_union_3d(); /* Test hyperslab union code for 3-D dataset */
-#endif /* NEW_HYPERSLAB_API */
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
@@ -13780,6 +13422,6 @@ test_select(void)
void
cleanup_select(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/tsohm.c b/test/tsohm.c
index bd73d00..5c3707f 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -621,12 +621,12 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, int test_file_clos
HDmemset(&rdata, 0, sizeof(rdata)); \
if (0 > H5Dread((dset_id), (dtype_id), H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata)) { \
H5_FAILED(); AT(); \
- printf("Can't read data\n"); \
+ HDprintf("Can't read data\n"); \
goto error; \
} \
if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str)) { \
H5_FAILED(); AT(); \
- printf("incorrect read data\n"); \
+ HDprintf("incorrect read data\n"); \
goto error; \
} \
} /* TSOHM_S1H_VERIFY_DATA() definition */
@@ -1383,7 +1383,7 @@ size2_verify_plist1(hid_t plist)
ret = H5Pget_fill_value(plist, dtype1_id, &fill1);
CHECK_I(ret, "H5Pget_fill_value");
- ret = memcmp(&fill1, &fill1_correct, sizeof(fill1_correct));
+ ret = HDmemcmp(&fill1, &fill1_correct, sizeof(fill1_correct));
VERIFY(ret, 0, "memcmp");
ret = H5Tclose(dtype1_id);
@@ -1482,15 +1482,15 @@ size2_verify_plist2(hid_t plist)
static void
size2_dump_struct(const char *name, size2_helper_struct *sizes)
{
- puts(name);
- printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
- printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset, (unsigned long long)(sizes->first_dset - sizes->empty_size));
- printf("second dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->second_dset, (unsigned long long)(sizes->second_dset - sizes->first_dset));
- printf(" dsets 1: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets1, (unsigned long long)(sizes->dsets1 - sizes->second_dset));
- printf(" dsets 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets2, (unsigned long long)(sizes->dsets2 - sizes->dsets1));
- printf(" interleaved: %llu \tdelta: %llu\n", (unsigned long long)sizes->interleaved, (unsigned long long)(sizes->interleaved - sizes->dsets2));
- printf(" attributes: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs1, (unsigned long long)(sizes->attrs1 - sizes->interleaved));
- printf(" attributes 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs2, (unsigned long long)(sizes->attrs2 - sizes->attrs1));
+ HDputs(name);
+ HDprintf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
+ HDprintf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset, (unsigned long long)(sizes->first_dset - sizes->empty_size));
+ HDprintf("second dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->second_dset, (unsigned long long)(sizes->second_dset - sizes->first_dset));
+ HDprintf(" dsets 1: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets1, (unsigned long long)(sizes->dsets1 - sizes->second_dset));
+ HDprintf(" dsets 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets2, (unsigned long long)(sizes->dsets2 - sizes->dsets1));
+ HDprintf(" interleaved: %llu \tdelta: %llu\n", (unsigned long long)sizes->interleaved, (unsigned long long)(sizes->interleaved - sizes->dsets2));
+ HDprintf(" attributes: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs1, (unsigned long long)(sizes->attrs1 - sizes->interleaved));
+ HDprintf(" attributes 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs2, (unsigned long long)(sizes->attrs2 - sizes->attrs1));
} /* size2_dump_struct */
#endif /* NOT_NOW */
@@ -3862,8 +3862,8 @@ test_sohm(void)
void
cleanup_sohm(void)
{
- remove(FILENAME);
- remove(FILENAME_SRC);
- remove(FILENAME_DST);
+ HDremove(FILENAME);
+ HDremove(FILENAME_SRC);
+ HDremove(FILENAME_DST);
} /* cleanup_sohm */
diff --git a/test/ttime.c b/test/ttime.c
index 48c9ba8..5b3436d 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -178,13 +178,13 @@ test_time_io(void)
tid = H5Dget_type(dsid);
CHECK(tid, FAIL, "H5Dget_type");
if( H5Tget_class (tid) == H5T_TIME)
- fprintf(stderr,"datatype class is H5T_TIME\n");
+ HDfprintf(stderr,"datatype class is H5T_TIME\n");
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
status = H5Dread (dsid, H5T_UNIX_D32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, &timethen);
CHECK(status, FAIL, "H5Dread");
-fprintf(stderr,"time written was: %s\n", HDctime(&timethen));
+HDfprintf(stderr,"time written was: %s\n", HDctime(&timethen));
status = H5Dclose(dsid);
CHECK(status, FAIL, "H5Dclose");
@@ -231,6 +231,6 @@ test_time(void)
void
cleanup_time(void)
{
- remove(DATAFILE);
+ HDremove(DATAFILE);
}
diff --git a/test/tunicode.c b/test/tunicode.c
index 5a60036..255dc50 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -854,7 +854,7 @@ void test_unicode(void)
*/
void cleanup_unicode(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/tvlstr.c b/test/tvlstr.c
index da6195c..77589bb 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -183,7 +183,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for(i=0,str_used=0; i<SPACE1_DIM1; i++)
- str_used+=HDstrlen(wdata[i])+1;
+ str_used += HDstrlen(wdata[i])+1;
/* Compare against the strings actually written */
VERIFY(size,(hsize_t)str_used,"H5Dvlen_get_buf_size");
@@ -198,7 +198,7 @@ test_vlstrings_basic(void)
/* Compare data read in */
for(i = 0; i < SPACE1_DIM1; i++) {
if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i]));
continue;
} /* end if */
if(HDstrcmp(wdata[i], rdata[i]) != 0 ) {
@@ -300,7 +300,7 @@ test_vlstrings_special(void)
/* Compare data read in */
for(i = 0; i < SPACE1_DIM1; i++) {
if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i]));
continue;
} /* end if */
if((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
@@ -527,7 +527,7 @@ test_compact_vlstring(void)
/* Compare data read in */
for(i = 0; i < SPACE1_DIM1; i++) {
if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i]));
continue;
} /* end if */
if(HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -802,33 +802,33 @@ static void test_vl_rewrite(void)
/* Create in file 1 */
for(i=0; i<REWRITE_NDATASETS; i++) {
- sprintf(name, "/set_%d", i);
+ HDsprintf(name, "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for(i=0; i<REWRITE_NDATASETS; i++) {
- sprintf(name, "/set_%d", i);
+ HDsprintf(name, "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for(i = 0; i < REWRITE_NDATASETS; i++) {
- sprintf(name, "/set_%d", i);
+ HDsprintf(name, "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for(i = 0; i < REWRITE_NDATASETS; i++) {
- sprintf(name, "/set_%d", i);
+ HDsprintf(name, "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for(i = 0; i < REWRITE_NDATASETS; i++) {
- sprintf(name, "/set_%d", i);
+ HDsprintf(name, "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/vds.c b/test/vds.c
index 4f03bbd..67af8e3 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -378,7 +378,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
TEST_ERROR
if(config == TEST_API_REOPEN_FILE) {
if(oinfo.meta_size.obj.heap_size != exp_meta_size) {
- printf("VDS metadata size: %llu Expected: %llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size);
+ HDprintf("VDS metadata size: %llu Expected: %llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size);
TEST_ERROR
}
}
@@ -11619,7 +11619,7 @@ main(void)
for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++)
nerrors += test_api((test_api_config_t)test_api_config, fapl);
for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
- printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
+ HDprintf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
nerrors += test_basic_io(bit_config, fapl);
nerrors += test_vds_prefix(bit_config, fapl);
nerrors += test_unlim(bit_config, fapl);
@@ -11634,14 +11634,14 @@ main(void)
if(nerrors)
goto error;
- printf("All virtual dataset tests passed.\n");
+ HDprintf("All virtual dataset tests passed.\n");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
- printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n",
+ HDprintf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/vfd.c b/test/vfd.c
index 19223ea..2305593 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -412,8 +412,8 @@ test_core(void)
for(j = 0; j < CORE_DSET_DIM2; j++)
if(*pr++ != *pw++) {
H5_FAILED();
- printf(" Read different values than written in data set.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written in data set.\n");
+ HDprintf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -480,8 +480,8 @@ test_core(void)
for(j = 0; j < CORE_DSET_DIM2; j++)
if(*pw++ != *pr++) {
H5_FAILED();
- printf(" Read different values than written in data set.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written in data set.\n");
+ HDprintf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -597,7 +597,7 @@ test_direct(void)
if(file<0) {
H5Pclose (fapl);
SKIPPED();
- printf(" Probably the file system doesn't support Direct I/O\n");
+ HDprintf(" Probably the file system doesn't support Direct I/O\n");
return 0;
}
@@ -674,8 +674,8 @@ test_direct(void)
for(j = 0; j < DSET1_DIM2; j++)
if(*p1++ != *p2++) {
H5_FAILED();
- printf(" Read different values than written in data set 1.\n");
- printf(" At index %d,%d\n", i, j);
+ HDprintf(" Read different values than written in data set 1.\n");
+ HDprintf(" At index %d,%d\n", i, j);
TEST_ERROR;
} /* end if */
@@ -706,8 +706,8 @@ test_direct(void)
for(i = 0; i < DSET2_DIM; i++)
if(wdata2[i] != rdata2[i]) {
H5_FAILED();
- printf(" Read different values than written in data set 2.\n");
- printf(" At index %d\n", i);
+ HDprintf(" Read different values than written in data set 2.\n");
+ HDprintf(" At index %d\n", i);
TEST_ERROR;
} /* end if */
@@ -1199,19 +1199,19 @@ test_multi(void)
memb_map[H5FD_MEM_BTREE] = H5FD_MEM_BTREE;
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
- sprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's');
+ HDsprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- sprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b');
+ HDsprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX/4;
- sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r');
+ HDsprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
- sprintf(sv[H5FD_MEM_GHEAP], "%%s-%c.h5", 'g');
+ HDsprintf(sv[H5FD_MEM_GHEAP], "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = (HADDR_MAX/4)*3;
@@ -1431,12 +1431,12 @@ test_multi_compat(void)
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- sprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's');
+ HDsprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r');
+ HDsprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
@@ -1446,17 +1446,19 @@ test_multi_compat(void)
h5_fixname(FILENAME[9], fapl, newname, sizeof newname);
/* Make copy for the data file in the build directory, to protect the
- * original file in the source directory */
- sprintf(filename_s, "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
- sprintf(newname_s, "%s-%c.h5", FILENAME[9], 's');
+ * original file in the source directory
+ */
+ HDsprintf(filename_s, "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
+ HDsprintf(newname_s, "%s-%c.h5", FILENAME[9], 's');
h5_make_local_copy(filename_s, newname_s);
- sprintf(filename_r, "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
- sprintf(newname_r, "%s-%c.h5", FILENAME[9], 'r');
+ HDsprintf(filename_r, "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
+ HDsprintf(newname_r, "%s-%c.h5", FILENAME[9], 'r');
h5_make_local_copy(filename_r, newname_r);
/* Reopen the file for read only. Verify 1.8 library can open file
- * created with 1.6 library. */
+ * created with 1.6 library.
+ */
if((file=H5Fopen(newname, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR;
diff --git a/test/vol.c b/test/vol.c
index c55874a..e267084 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -49,16 +49,20 @@ static const H5VL_class_t fake_vol_g = {
0, /* capability flags */
NULL, /* initialize */
NULL, /* terminate */
- (size_t)0, /* info size */
- NULL, /* info copy */
- NULL, /* info compare */
- NULL, /* info free */
- NULL, /* info to str */
- NULL, /* str to info */
- NULL, /* get_object */
- NULL, /* get_wrap_ctx */
- NULL, /* wrap_object */
- NULL, /* free_wrap_ctx */
+ { /* info_cls */
+ (size_t)0, /* size */
+ NULL, /* copy */
+ NULL, /* compare */
+ NULL, /* free */
+ NULL, /* to_str */
+ NULL, /* from_str */
+ },
+ { /* wrap_cls */
+ NULL, /* get_object */
+ NULL, /* get_wrap_ctx */
+ NULL, /* wrap_object */
+ NULL, /* free_wrap_ctx */
+ },
{ /* attribute_cls */
NULL, /* create */
NULL, /* open */