summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2018-07-18 22:06:59 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2018-07-18 22:06:59 (GMT)
commit3c6654921000a8659276f1fcb32dd0ada1353558 (patch)
tree5255646f9764b9d04974f516b2134d3af6dcccab /test
parent892252106a1517a4cd715fa6257201e89fb25564 (diff)
parentd95f36686b2a68bcd848d68bcb81be520d01f037 (diff)
downloadhdf5-3c6654921000a8659276f1fcb32dd0ada1353558.zip
hdf5-3c6654921000a8659276f1fcb32dd0ada1353558.tar.gz
hdf5-3c6654921000a8659276f1fcb32dd0ada1353558.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into develop
Diffstat (limited to 'test')
-rw-r--r--test/CMakeTests.cmake113
-rw-r--r--test/ShellTests.cmake244
-rw-r--r--test/cache_common.c2
-rw-r--r--test/cache_common.h2
-rw-r--r--test/cache_image.c24
-rw-r--r--test/cache_tagging.c22
-rw-r--r--test/dtransform.c2
-rw-r--r--test/enum.c2
-rw-r--r--test/flushrefreshTest.cmake172
-rw-r--r--test/mf.c16
-rw-r--r--test/mtime.c2
-rw-r--r--test/page_buffer.c10
-rw-r--r--test/vds.c2
13 files changed, 545 insertions, 68 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 39d9d0d..34e21f7 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -228,29 +228,30 @@ add_test (NAME H5TEST-clear-testhdf5-objects
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP clear_testhdf5)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
set_tests_properties (H5TEST-testhdf5-base PROPERTIES
- DEPENDS H5TEST-clear-testhdf5-objects
+ FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
set_tests_properties (H5TEST-testhdf5-heap PROPERTIES
- DEPENDS H5TEST-clear-testhdf5-objects
+ FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
set_tests_properties (H5TEST-testhdf5-file PROPERTIES
- DEPENDS H5TEST-clear-testhdf5-objects
+ FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
set_tests_properties (H5TEST-testhdf5-select PROPERTIES
- DEPENDS H5TEST-clear-testhdf5-objects
+ FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -266,7 +267,7 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-testhdf5 PROPERTIES
- DEPENDS H5TEST-clear-testhdf5-objects
+ FIXTURES_REQUIRED clear_testhdf5
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -295,6 +296,7 @@ else ()
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-shared-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP shared_clear_testhdf5)
add_test (NAME H5TEST-shared-testhdf5 COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:testhdf5-shared>"
-D "TEST_ARGS:STRING="
@@ -306,7 +308,7 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES
- DEPENDS H5TEST-shared-clear-testhdf5-objects
+ FIXTURES_REQUIRED shared_clear_testhdf5
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -543,6 +545,7 @@ add_test (NAME H5TEST-clear-objects
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP clear_objects)
set (H5TEST_SEPARATE_TESTS
testhdf5
@@ -554,7 +557,7 @@ foreach (test ${H5_TESTS})
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
set_tests_properties (H5TEST-${test} PROPERTIES
- DEPENDS H5TEST-clear-objects
+ FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -576,7 +579,7 @@ foreach (test ${H5_TESTS})
)
endif ()
set_tests_properties (H5TEST-${test} PROPERTIES
- DEPENDS H5TEST-clear-objects
+ FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -599,6 +602,7 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-shared-clear-objects PROPERTIES FIXTURES_SETUP shared_clear_objects)
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
@@ -619,7 +623,7 @@ if (BUILD_SHARED_LIBS)
)
endif ()
set_tests_properties (H5TEST-shared-${test} PROPERTIES
- DEPENDS H5TEST-shared-clear-objects
+ FIXTURES_REQUIRED shared_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -642,6 +646,7 @@ if (NOT CYGWIN)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+ set_tests_properties (H5TEST-clear-cache-objects PROPERTIES FIXTURES_SETUP cache_clear_objects)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>)
else ()
@@ -657,7 +662,7 @@ if (NOT CYGWIN)
)
endif ()
set_tests_properties (H5TEST-cache PROPERTIES
- DEPENDS H5TEST-clear-cache-objects
+ FIXTURES_REQUIRED cache_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -673,9 +678,10 @@ add_test (
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-cache_image-objects PROPERTIES FIXTURES_SETUP cache_image_clear_objects)
add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
set_tests_properties (H5TEST-cache_image PROPERTIES
- DEPENDS H5TEST-clear-cache_image-objects
+ FIXTURES_REQUIRED cache_image_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -690,6 +696,7 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP shared_cache_clear_objects)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
else ()
@@ -705,7 +712,7 @@ if (BUILD_SHARED_LIBS)
)
endif ()
set_tests_properties (H5TEST-shared-cache PROPERTIES
- DEPENDS H5TEST-shared-clear-cache-objects
+ FIXTURES_REQUIRED shared_cache_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -756,9 +763,10 @@ add_test (
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-filenotclosed-objects PROPERTIES FIXTURES_SETUP filenotclosed_clear_objects)
add_test (NAME H5TEST-filenotclosed COMMAND $<TARGET_FILE:filenotclosed>)
set_tests_properties (H5TEST-filenotclosed PROPERTIES
- DEPENDS H5TEST-clear-filenotclosed-objects
+ FIXTURES_REQUIRED filenotclosed_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -773,6 +781,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+ set_tests_properties (H5TEST-clear-err_compat-objects PROPERTIES FIXTURES_SETUP err_compat_clear_objects)
add_test (NAME H5TEST-err_compat COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:err_compat>"
-D "TEST_ARGS:STRING="
@@ -784,7 +793,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-err_compat PROPERTIES
- DEPENDS H5TEST-clear-err_compat-objects
+ FIXTURES_REQUIRED err_compat_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -799,6 +808,7 @@ add_test (NAME H5TEST-clear-error_test-objects
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-error_test-objects PROPERTIES FIXTURES_SETUP error_test_clear_objects)
if (HDF5_USE_16_API_DEFAULT)
add_test (
NAME H5TEST-error_test-SKIPPED
@@ -816,7 +826,7 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-error_test PROPERTIES
- DEPENDS H5TEST-clear-error_test-objects
+ FIXTURES_REQUIRED error_test_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -834,6 +844,7 @@ add_test (NAME H5TEST-clear-links_env-objects
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
+set_tests_properties (H5TEST-clear-links_env-objects PROPERTIES FIXTURES_SETUP links_env_clear_objects)
add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
-D "TEST_ARGS:STRING="
@@ -846,7 +857,7 @@ add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-links_env PROPERTIES
- DEPENDS H5TEST-clear-links_env-objects
+ FIXTURES_REQUIRED links_env_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -869,6 +880,7 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-shared-clear-err_compat-objects PROPERTIES FIXTURES_SETUP shared_err_compat_clear_objects)
add_test (NAME H5TEST-shared-err_compat COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:err_compat-shared>"
-D "TEST_ARGS:STRING="
@@ -880,7 +892,7 @@ if (BUILD_SHARED_LIBS)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-shared-err_compat PROPERTIES
- DEPENDS H5TEST-shared-clear-err_compat-objects
+ FIXTURES_REQUIRED shared_err_compat_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -895,6 +907,7 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-shared-clear-error_test-objects PROPERTIES FIXTURES_SETUP shared_error_test_clear_objects)
if (HDF5_USE_16_API_DEFAULT)
add_test (
NAME H5TEST-shared-error_test-SKIPPED
@@ -912,7 +925,7 @@ if (BUILD_SHARED_LIBS)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-shared-error_test PROPERTIES
- DEPENDS H5TEST-shared-clear-error_test-objects
+ FIXTURES_REQUIRED shared_error_test_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -930,6 +943,7 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
+ set_tests_properties (H5TEST-shared-clear-links_env-objects PROPERTIES FIXTURES_SETUP shared_links_env_clear_objects)
add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:links_env-shared>"
-D "TEST_ARGS:STRING="
@@ -942,7 +956,7 @@ if (BUILD_SHARED_LIBS)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5TEST-shared-links_env PROPERTIES
- DEPENDS H5TEST-shared-clear-links_env-objects
+ FIXTURES_REQUIRED shared_links_env_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
@@ -982,13 +996,60 @@ set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES
#)
##############################################################################
-##############################################################################
-### S W M R T E S T S
-##############################################################################
-# testflushrefresh.sh: flushrefresh
-# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
-# testswmr.sh: swmr*
-# testvdsswmr.sh: vds_swmr*
+if (TEST_SHELL_SCRIPTS)
+ include (ShellTests.cmake)
+endif()
+
+if (ENABLE_EXTENDED_TESTS)
+ ##############################################################################
+ ### S W M R T E S T S
+ ##############################################################################
+ # testflushrefresh.sh: flushrefresh
+ # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
+ # testswmr.sh: swmr*
+ # testvdsswmr.sh: vds_swmr*
+
+# add_test (NAME H5Test-swmr_check_compat_vfd COMMAND $<TARGET_FILE:swmr_check_compat_vfd>)
+
+#-- Adding test for flushrefresh
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
+ if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/flushrefresh_test")
+ endif ()
+ find_package (Perl)
+ if (PERL_FOUND)
+ add_test (NAME H5TEST-clear-testflushrefresh-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ flushrefresh.txt
+ flushrefresh.txt.err
+ flushrefresh.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
+ )
+ set_tests_properties (H5TEST-clear-testflushrefresh-objects PROPERTIES FIXTURES_SETUP testflushrefresh_clear_objects)
+ add_test (NAME H5TEST-testflushrefresh COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:flushrefresh>"
+ -D "TEST_ARGS1:STRING=flushrefresh_VERIFICATION_START"
+ -D "TEST_ARGS2:STRING=flushrefresh_VERIFICATION_DONE"
+ -D "TEST_ERR:STRING=flushrefresh_ERROR"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=flushrefresh.out"
+ -D "TEST_REFERENCE=flushrefresh.txt"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test"
+ -D "PERL_SCRIPT=${HDF5_SOURCE_DIR}/bin/runbkgprog"
+ -D "PERL_EXECUTABLE=${PERL_EXECUTABLE}"
+ -P "${HDF5_TEST_SOURCE_DIR}/flushrefreshTest.cmake"
+ )
+ set_tests_properties (H5TEST-testflushrefresh PROPERTIES
+ FIXTURES_REQUIRED testflushrefresh_clear_objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
+ )
+ else ()
+ message (STATUS "Cannot execute TEST flushrefresh - perl not found")
+ endif ()
+endif()
##############################################################################
##############################################################################
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
new file mode 100644
index 0000000..fe997b2
--- /dev/null
+++ b/test/ShellTests.cmake
@@ -0,0 +1,244 @@
+
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G S H E L L S C R I P T S ###
+##############################################################################
+
+if (UNIX)
+
+ find_program (SH_PROGRAM sh)
+ if (SH_PROGRAM)
+
+ ##############################################################################
+ # configure scripts to test dir
+ ##############################################################################
+ find_package (Perl)
+ if (PERL_FOUND)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY)
+ endif ()
+ configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/testcheck_version.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testcheck_version.sh @ONLY)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh @ONLY)
+ configure_file(${HDF5_TEST_SOURCE_DIR}/testvdsswmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh @ONLY)
+
+ ##############################################################################
+ # copy test programs to test dir
+ ##############################################################################
+ add_custom_command (
+ TARGET swmr_check_compat_vfd
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_check_compat_vfd>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_check_compat_vfd"
+ )
+
+ add_custom_command (
+ TARGET swmr_check_compat_vfd
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh"
+ )
+
+ add_custom_command (
+ TARGET tcheck_version
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_BINARY_DIR}/H5pubconf.h" "${HDF5_TEST_BINARY_DIR}/src/H5pubconf.h"
+ )
+
+ add_custom_command (
+ TARGET tcheck_version
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_BINARY_DIR}/libhdf5.settings" "${HDF5_TEST_BINARY_DIR}/src/libhdf5.settings"
+ )
+
+ add_custom_command (
+ TARGET tcheck_version
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/src/H5public.h" "${HDF5_TEST_BINARY_DIR}/src/H5public.h"
+ )
+
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
+ add_custom_command (
+ TARGET flushrefresh
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:flushrefresh>" "${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh"
+ )
+
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test")
+ add_custom_command (
+ TARGET use_append_mchunks
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:use_append_mchunks>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_mchunks"
+ )
+ add_custom_command (
+ TARGET use_disable_mdc_flushes
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:use_disable_mdc_flushes>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_disable_mdc_flushes"
+ )
+ add_custom_command (
+ TARGET twriteorder
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:twriteorder>" "${HDF5_TEST_BINARY_DIR}/H5TEST/twriteorder"
+ )
+ add_custom_command (
+ TARGET use_append_chunk
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:use_append_chunk>" "${HDF5_TEST_BINARY_DIR}/H5TEST/use_append_chunk"
+ )
+
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
+ add_custom_command (
+ TARGET swmr_generator
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_generator>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_generator"
+ )
+ add_custom_command (
+ TARGET swmr_start_write
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_start_write>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_start_write"
+ )
+ add_custom_command (
+ TARGET swmr_reader
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_reader"
+ )
+ add_custom_command (
+ TARGET swmr_writer
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_writer"
+ )
+ add_custom_command (
+ TARGET swmr_remove_reader
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_reader"
+ )
+ add_custom_command (
+ TARGET swmr_remove_writer
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_remove_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_remove_writer"
+ )
+ add_custom_command (
+ TARGET swmr_addrem_writer
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_addrem_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_addrem_writer"
+ )
+ add_custom_command (
+ TARGET swmr_sparse_reader
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_reader"
+ )
+ add_custom_command (
+ TARGET swmr_sparse_writer
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:swmr_sparse_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/swmr_test/swmr_sparse_writer"
+ )
+
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
+ add_custom_command (
+ TARGET vds_swmr_gen
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_gen>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_gen"
+ )
+ add_custom_command (
+ TARGET vds_swmr_writer
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_writer>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_writer"
+ )
+ add_custom_command (
+ TARGET vds_swmr_reader
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "$<TARGET_FILE:vds_swmr_reader>" "${HDF5_TEST_BINARY_DIR}/H5TEST/vds_swmr_reader"
+ )
+
+
+
+ ##############################################################################
+ ##############################################################################
+ ### A D D I T I O N A L T E S T S ###
+ ##############################################################################
+ ##############################################################################
+ # H5_CHECK_TESTS
+ #---------------
+ # tcheck_version
+ # atomic_writer
+ # atomic_reader
+ # filenotclosed
+ # flushrefresh
+ ##############################################################################
+ # autotools script tests
+ # error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
+ # NOT CONVERTED tcheck_version is used by testcheck_version.sh.
+ # NOT CONVERTED accum_swmr_reader is used by accum.c.
+ # NOT CONVERTED atomic_writer and atomic_reader are standalone programs.
+ # links_env is used by testlinks_env.sh
+ # filenotclosed is used by test_filenotclosed.sh
+ # NOT CONVERTED flushrefresh is used by testflushrefresh.sh.
+ # NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh
+ # NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh.
+ # NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh
+ # NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG.
+ # NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly,
+ # NOT CONVERTED and this lets automake keep all its test programs in one place.
+ ##############################################################################
+
+ ##############################################################################
+ ### S W M R T E S T S
+ ##############################################################################
+ # testflushrefresh.sh: flushrefresh
+ # test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
+ # testswmr.sh: swmr*
+ # testvdsswmr.sh: vds_swmr*
+ add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh)
+ set_tests_properties (H5SHELL-testflushrefresh PROPERTIES
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ add_test (H5SHELL-test_usecases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh)
+ set_tests_properties (H5SHELL-test_usecases PROPERTIES
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ add_test (H5SHELL-testswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh)
+ set_tests_properties (H5SHELL-testswmr PROPERTIES
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ add_test (H5SHELL-testvdsswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh)
+ set_tests_properties (H5SHELL-testvdsswmr PROPERTIES
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ add_test (H5SHELL-testcheck_version ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testcheck_version.sh)
+ set_tests_properties (H5SHELL-testcheck_version PROPERTIES
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+
+ endif ()
+endif ()
diff --git a/test/cache_common.c b/test/cache_common.c
index 5596601..2cc188e 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -6413,7 +6413,7 @@ validate_mdc_config(hid_t file_id,
* the supplied external configuration.
*
* The cache also sets the initial_size field to the current
- * cache max size instead of the value initialy supplied.
+ * cache max size instead of the value initially supplied.
* Depending on circumstances, this may or may not match
* the original. Hence the compare_init parameter.
*/
diff --git a/test/cache_common.h b/test/cache_common.h
index 8999e44..9c66357 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -180,7 +180,7 @@ typedef struct flush_op
hbool_t flag; /* boolean flag passed into the
* function implementing the flush
* operation. The meaning of the
- * flag is dependant upon the flush
+ * flag is dependent upon the flush
* operation:
*
* FLUSH_OP__DIRTY: TRUE iff the
diff --git a/test/cache_image.c b/test/cache_image.c
index 58b0b8f..5967ecc 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -511,7 +511,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
* FAPL entry when opening the file, and verify that the
* metadata cache is notified.
*
- * If config_fsm is TRUE, setup the persistant free space
+ * If config_fsm is TRUE, setup the persistent free space
* manager. Note that this flag may only be set if
* create_file is also TRUE.
*
@@ -654,7 +654,7 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected,
if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- /* setup the persistant free space manager if indicated */
+ /* setup the persistent free space manager if indicated */
if ( ( pass ) && ( config_fsm ) ) {
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -5149,9 +5149,9 @@ cache_image_smoke_check_5(void)
* 13) Close the file.
*
* 14) Get the size of the file. Verify that it is less
- * than 20 KB. Without deletions and persistant free
+ * than 20 KB. Without deletions and persistent free
* space managers, size size is about 167 MB, so this
- * is sufficient to verify that the persistant free
+ * is sufficient to verify that the persistent free
* space managers are more or less doing their job.
*
* Note that in the absence of paged allocation, file
@@ -5473,9 +5473,9 @@ cache_image_smoke_check_6(void)
/* 14) Get the size of the file. Verify that it is less
- * than 20 KB. Without deletions and persistant free
+ * than 20 KB. Without deletions and persistent free
* space managers, size size is about 167 MB, so this
- * is sufficient to verify that the persistant free
+ * is sufficient to verify that the persistent free
* space managers are more or less doing their job.
*
* Note that in the absence of paged allocation, file
@@ -7160,7 +7160,7 @@ cache_image_api_error_check_4(void)
* called before any activity on the metadata cache.
* This is a potential problem, as satisfying the
* H5Fget_free_sections() call requires access to all
- * free space managers. When persistant free space
+ * free space managers. When persistent free space
* managers are enabled, this will require calling
* H5MF_tidy_self_referential_fsm_hack(). This is a
* non issue in the absence of a cache image. However,
@@ -7179,7 +7179,7 @@ cache_image_api_error_check_4(void)
* The test is set up as follows:
*
* 1) Create a HDF5 file with a cache image requested
- * and persistant free space managers enabled.
+ * and persistent free space managers enabled.
*
* 2) Create some data sets, and then delete some of
* of those near the beginning of the file.
@@ -7273,7 +7273,7 @@ get_free_sections_test(void)
/* 1) Create a HDF5 file with a cache image requested
- * and persistant free space managers enabled.
+ * and persistent free space managers enabled.
*/
if ( pass ) {
@@ -7666,13 +7666,13 @@ get_free_sections_test(void)
* the dirty metadata, the second scan will fail, as valid
* versions of the dirty metadata will not be available.
*
- * To make the test more useful, enable persistant free
+ * To make the test more useful, enable persistent free
* space managers.
*
* The test is set up as follows:
*
* 1) Create a HDF5 file without a cache image requested
- * and persistant free space managers enabled.
+ * and persistent free space managers enabled.
*
* 2) Create some data sets and verify them.
*
@@ -7753,7 +7753,7 @@ evict_on_close_test(void)
/* 1) Create a HDF5 file without a cache image requested
- * and persistant free space managers enabled.
+ * and persistent free space managers enabled.
*/
if ( pass ) {
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index d34cad3..119ba62 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -1514,7 +1514,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistant_fsms = FALSE;
+ hbool_t persistent_fsms = FALSE;
/* Testing Macro */
TESTING("tag application during attribute renaming");
@@ -1523,8 +1523,8 @@ check_attribute_rename_tags(hid_t fcpl, int type)
/* Setup */
/* ===== */
- /* check to see if the FCPL specified persistant free space managers */
- if(H5Pget_file_space_strategy(fcpl, NULL, &persistant_fsms, NULL) < 0)
+ /* check to see if the FCPL specified persistent free space managers */
+ if(H5Pget_file_space_strategy(fcpl, NULL, &persistent_fsms, NULL) < 0)
TEST_ERROR;
/* Allocate array */
@@ -1621,14 +1621,14 @@ check_attribute_rename_tags(hid_t fcpl, int type)
*/
if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
- /* If the free space managers are persistant, the
+ /* If the free space managers are persistent, the
* H5MF_tidy_self_referential_fsm_hack() must have been run.
* Since this function floats all self referential free space
* managers, the H5FD_MEM_SUPER FSM will not be in the metadata
* cache.
*/
- if(!persistant_fsms && verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR;
- if(!persistant_fsms && verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR;
+ if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR;
+ if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR;
/* verify btree header and leaf node belonging to group */
if ( verify_tag(fid, H5AC_BT2_HDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -1693,7 +1693,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
haddr_t g_tag = 0;
hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* dimensions */
- hbool_t persistant_fsms = FALSE;
+ hbool_t persistent_fsms = FALSE;
/* Testing Macro */
TESTING("tag application during attribute delete");
@@ -1702,8 +1702,8 @@ check_attribute_delete_tags(hid_t fcpl, int type)
/* Setup */
/* ===== */
- /* check to see if the FCPL specified persistant free space managers */
- if ( H5Pget_file_space_strategy(fcpl, NULL, &persistant_fsms, NULL) < 0 )
+ /* check to see if the FCPL specified persistent free space managers */
+ if ( H5Pget_file_space_strategy(fcpl, NULL, &persistent_fsms, NULL) < 0 )
TEST_ERROR;
/* Allocate array */
@@ -1781,13 +1781,13 @@ check_attribute_delete_tags(hid_t fcpl, int type)
TEST_ERROR;
#if 0
- /* If the free space managers are persistant, the
+ /* If the free space managers are persistent, the
* H5MF_tidy_self_referential_fsm_hack() must have been run.
* Since this function floats all self referential free space
* managers, the H5FD_MEM_SUPER FSM will not be in the metadata
* cache.
*/
- if ( ( ! persistant_fsms ) &&
+ if ( ( ! persistent_fsms ) &&
( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) )
TEST_ERROR;
#endif
diff --git a/test/dtransform.c b/test/dtransform.c
index 0381bb8..f022699 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -744,7 +744,7 @@ test_getset(const hid_t dxpl_id_c_to_f)
HDfree(ptrgetTest);
ptrgetTest = NULL;
- TESTING("data transform, read after reseting of transform property")
+ TESTING("data transform, read after resetting of transform property")
if(H5Pset_data_transform(dxpl_id_c_to_f, simple) < 0)
TEST_ERROR
diff --git a/test/enum.c b/test/enum.c
index 4e20713..588e9b3 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -374,7 +374,7 @@ test_tr2(hid_t file)
E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED};
c_e1 data2[10];
- TESTING("O(log N) converions");
+ TESTING("O(log N) conversions");
if((cwg = H5Gcreate2(file, "test_tr2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake
new file mode 100644
index 0000000..f66ee64
--- /dev/null
+++ b/test/flushrefreshTest.cmake
@@ -0,0 +1,172 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# runTest.cmake executes a command and captures the output in a file. File is then compared
+# against a reference file. Exit status of command can also be compared.
+cmake_policy(SET CMP0007 NEW)
+
+# arguments checking
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif ()
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_OUTPUT)
+ message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
+endif ()
+if (NOT PERL_SCRIPT)
+ message (STATUS "Require PERL_BIN_DIR to be defined")
+endif ()
+if (NOT PERL_EXECUTABLE)
+ message (STATUS "Require PERL_EXECUTABLE to be defined")
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+if (TEST_LIBRARY_DIRECTORY)
+ if (WIN32 AND NOT MINGW)
+ set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
+ else ()
+ set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
+ endif ()
+endif ()
+
+if (TEST_ENV_VAR)
+ set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
+ #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+endif ()
+
+message(STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
+execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}
+ RESULT_VARIABLE SCRIPT_RESULT
+ ERROR_VARIABLE SCRIPT_ERR
+ OUTPUT_VARIABLE SCRIPT_OUTPUT
+ WORKING_DIRECTORY ${TEST_FOLDER}
+)
+message(STATUS "Background: ${SCRIPT_OUTPUT}")
+if (NOT "${SCRIPT_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The background script failed ${SCRIPT_RESULT}: ${SCRIPT_ERR}")
+endif ()
+
+set(verification_done "0")
+while(verification_done LESS "1")
+ message(STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+ # Error exit script
+ set(verification_done "3")
+ elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
+ list (LENGTH v1 len_v1)
+ message(STATUS "v1:${v1} len_v1:${len_v1}")
+ if (NOT "${len_v1}" STREQUAL "0")
+ list (GET v1 0 param1)
+ list (GET v1 -1 param2)
+ endif ()
+ file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+
+ if(${param1} MATCHES "VERIFICATION_DONE")
+ set(verification_done "1")
+ file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
+ message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else()
+ message(STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
+ execute_process (
+ COMMAND ${TEST_PROGRAM} ${param1} ${param2}
+ RESULT_VARIABLE TEST_RESULT
+ OUTPUT_FILE ${TEST_OUTPUT}
+ ERROR_FILE ${TEST_OUTPUT}.err
+ OUTPUT_VARIABLE TEST_OUT
+ ERROR_VARIABLE TEST_ERROR
+ WORKING_DIRECTORY ${TEST_FOLDER}
+ )
+ message(STATUS "flush verification: ${TEST_OUT}")
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The flush verification failed ${TEST_RESULT}: ${TEST_ERROR}")
+ endif ()
+ file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
+ endif()
+ else()
+ message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ #execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
+ endif()
+endwhile()
+
+while(verification_done LESS "2")
+ message(STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+ # Error exit script
+ set(verification_done "3")
+ elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
+ list (LENGTH v1 len_v1)
+ message(STATUS "v1:${v1} len_v1:${len_v1}")
+ if (NOT "${len_v1}" STREQUAL "0")
+ list (GET v1 0 param1)
+ list (GET v1 -1 param2)
+ endif ()
+ file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+
+ if(${param1} MATCHES "VERIFICATION_DONE")
+ set(verification_done "2")
+ file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
+ message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else()
+ message(STATUS "execute: ${TEST_PROGRAM} ${param1}")
+ execute_process (
+ COMMAND ${TEST_PROGRAM} ${param1}
+ RESULT_VARIABLE TEST_RESULT
+ OUTPUT_FILE ${TEST_OUTPUT}
+ ERROR_FILE ${TEST_OUTPUT}.err
+ OUTPUT_VARIABLE TEST_OUT
+ ERROR_VARIABLE TEST_ERROR
+ WORKING_DIRECTORY ${TEST_FOLDER}
+ )
+ message(STATUS "refresh verification: ${TEST_OUT}")
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The refresh verification failed ${TEST_RESULT}: ${TEST_ERROR}")
+ endif ()
+ file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
+ endif()
+ else()
+ message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ #execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
+ endif()
+endwhile()
+
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
+
+# if the return value is !=${TEST_EXPECT} bail out
+if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+ if (NOT TEST_NOERRDISPLAY)
+ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ message (STATUS "Output :\n${TEST_STREAM}")
+ endif ()
+ endif ()
+ message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif ()
+
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
+
+# everything went fine...
+message ("Passed")
diff --git a/test/mf.c b/test/mf.c
index 9203804..04b7c0b 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -6114,21 +6114,21 @@ test_mf_fs_persist_split(void)
TESTING("File's free-space managers are persistent for split-file");
- /* for now, we don't support persistant free space managers
+ /* for now, we don't support persistent free space managers
* with the split file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n");
+ HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- /* for now, we don't support persistant free space managers
+ /* for now, we don't support persistent free space managers
* with the split file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n");
+ HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
@@ -6436,18 +6436,18 @@ test_mf_fs_persist_multi(void)
TESTING("File's free-space managers are persistent for multi-file");
- /* for now, we don't support persistant free space managers
+ /* for now, we don't support persistent free space managers
* with the multi file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n");
+ HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
- /* for now, we don't support persistant free space managers
+ /* for now, we don't support persistent free space managers
* with the multi file driver.
*/
SKIPPED();
- HDfprintf(stdout, " Persistant FSMs disabled in multi file driver.\n");
+ HDfprintf(stdout, " Persistent FSMs disabled in multi file driver.\n");
return 0; /* <========== note return */
/* File creation property list template */
diff --git a/test/mtime.c b/test/mtime.c
index 2cd2d31..80730eb 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -139,7 +139,7 @@ main(void)
if(oi1.ctime != MTIME1) {
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
- * system dependant (e.g., on Windows DST must be hardcoded). */
+ * system dependent (e.g., on Windows DST must be hardcoded). */
puts(" Old modification time incorrect");
goto error;
}
diff --git a/test/page_buffer.c b/test/page_buffer.c
index a6e85ee..3c61ab0 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -619,7 +619,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, data) < 0)
@@ -902,7 +902,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
@@ -1440,7 +1440,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
@@ -1567,7 +1567,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
@@ -1807,7 +1807,7 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
- /* intialize all the elements to have a value of -1 */
+ /* initialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
diff --git a/test/vds.c b/test/vds.c
index 3f00224..4f03bbd 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -115,7 +115,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if(npoints1 != npoints2)
return FALSE;
- /* Allocate point lists. Do not return directly afer
+ /* Allocate point lists. Do not return directly after
* allocating, to make sure buffers are freed. */
if(NULL == (buf1 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t))))
TEST_ERROR