Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Dynamic Analysis and sanitize testing #4681

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5FLT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ if (H5EX_BUILD_TESTING)
add_custom_target(${EXAMPLE_VARNAME}_example_files ALL COMMENT "Copying files needed by example tests" DEPENDS ${example_files_list})

foreach (h5_file ${dyn_examples})
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
if (${h5_file} MATCHES "h5ex_d_zfp")
## special filter
ADD_H5_TEST (h5ex_d_zfp FILTERALL)
Expand Down
8 changes: 4 additions & 4 deletions HDF5Examples/C/H5G/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down Expand Up @@ -271,7 +271,7 @@ if (H5EX_BUILD_TESTING)
endmacro ()

macro (ADD_H5_DUMP_TEST testname)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down Expand Up @@ -315,7 +315,7 @@ if (H5EX_BUILD_TESTING)
${testname}1.h5
${testname}2.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down Expand Up @@ -373,7 +373,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.out.tmp
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down
4 changes: 2 additions & 2 deletions HDF5Examples/C/H5T/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down Expand Up @@ -392,7 +392,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/H5VDS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}*.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
else ()
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/C/TUTR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (H5EX_BUILD_TESTING)
)

macro (ADD_H5_TEST testname)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_tutr_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_tutr_${testname}>)
else ()
add_test (
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/CXX/H5D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (H5EX_BUILD_TESTING)
)

macro (ADD_H5_TEST testname)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_cpp_ex_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_cpp_ex_${testname}>)
else ()
add_test (
Expand Down
2 changes: 1 addition & 1 deletion HDF5Examples/CXX/TUTR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (H5EX_BUILD_TESTING)
-E remove
${testname}.h5
)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME ${EXAMPLE_VARNAME}_cpp_ex_${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${EXAMPLE_VARNAME}_cpp_ex_${testname}>)
set_tests_properties (${EXAMPLE_VARNAME}_cpp_ex_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_cpp_ex_${testname}-clearall)
else ()
Expand Down
2 changes: 1 addition & 1 deletion c++/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_te
### T E S T I N G ###
##############################################################################
##############################################################################
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME CPP_testhdf5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_testhdf5>)
else ()
add_test (NAME CPP_testhdf5 COMMAND "${CMAKE_COMMAND}"
Expand Down
2 changes: 1 addition & 1 deletion c++/test/CMakeVFDTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ H5_CREATE_VFD_DIR()
##############################################################################
##############################################################################
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
Expand Down
26 changes: 0 additions & 26 deletions config/cmake/CTestCustom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,32 +175,6 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK_STAT-SPT_FSM_AGGR-clear-objects
H5REPACK_STAT-STG_PAGE-clear-objects
#########
H5REPACK_META-meta_long
H5REPACK_META-meta_short
#########
H5REPACK-gzip_verbose_filters #uses runTest.cmake
H5REPACK_VERIFY_LAYOUT-dset2_chunk_20x10 #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-chunk_20x10 #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset2_conti #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-conti #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset2_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_compa_conti #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_compa_chunk #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_compa_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_conti_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_conti_chunk #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-dset_conti_conti #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-chunk_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-chunk_conti #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-chunk_18x13 #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-contig_small_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT-contig_small_fixed_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-layout_long_switches #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-layout_short_switches #uses grepTest.cmake
H5REPACK-plugin
H5REPACK_CMP-plugin_zero
#########
ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-latest_latest_invalid-clear-objects
H5REPACK_VERIFY_SUPERBLOCK-SB_IS_0-clear-objects
H5REPACK_VERIFY_SUPERBLOCK-SB_IS_2-clear-objects
Expand Down
8 changes: 4 additions & 4 deletions fortran/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ set_tests_properties (FORTRAN_testhdf5-clean-objects PROPERTIES
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)

if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
else ()
add_test (NAME FORTRAN_testhdf5_fortran COMMAND "${CMAKE_COMMAND}"
Expand All @@ -99,7 +99,7 @@ if ("FORTRAN_testhdf5_fortran" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
endif ()

#-- Adding test for testhdf5_fortran_1_8
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran_1_8>)
else ()
add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND "${CMAKE_COMMAND}"
Expand All @@ -126,7 +126,7 @@ if ("FORTRAN_testhdf5_fortran_1_8" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
endif ()

#-- Adding test for fortranlib_test_F03
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fortranlib_test_F03>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}"
Expand All @@ -153,7 +153,7 @@ if ("FORTRAN_fortranlib_test_F03" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
endif ()

#-- Adding test for vol_connector
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_vol_connector COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:vol_connector>)
else ()
add_test (NAME FORTRAN_vol_connector COMMAND "${CMAKE_COMMAND}"
Expand Down
2 changes: 1 addition & 1 deletion hl/c++/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set_tests_properties (HL_CPP_ptableTest-clear-objects PROPERTIES
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)

if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME HL_CPP_ptableTest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ptableTest>)
else ()
add_test (NAME HL_CPP_ptableTest COMMAND "${CMAKE_COMMAND}"
Expand Down
2 changes: 1 addition & 1 deletion hl/fortran/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set_tests_properties (HL_FORTRAN_test-clean-objects PROPERTIES
)

macro (ADD_H5_FORTRAN_TEST file)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME HL_FORTRAN_f90_${file} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_f90_${file}>)
else ()
add_test (NAME HL_FORTRAN_f90_${file} COMMAND "${CMAKE_COMMAND}"
Expand Down
2 changes: 1 addition & 1 deletion hl/test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ set_tests_properties (HL_test-clean-objects PROPERTIES
# Macro used to add a unit test
# --------------------------------------------------------------------
macro (HL_ADD_TEST hl_name)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME HL_${hl_name} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_${hl_name}>)
else ()
add_test (NAME HL_${hl_name} COMMAND "${CMAKE_COMMAND}"
Expand Down
16 changes: 8 additions & 8 deletions test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ set (H5TEST_SEPARATE_TESTS
)
foreach (h5_test ${H5_EXPRESS_TESTS})
if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TESTXPR-${h5_test} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${h5_test}>)
set_tests_properties (H5TESTXPR-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_H5TEST
Expand Down Expand Up @@ -379,7 +379,7 @@ foreach (h5_test ${H5_EXPRESS_TESTS})
endforeach ()
foreach (h5_test ${H5_TESTS})
if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${h5_test} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${h5_test}>)
set_tests_properties (H5TEST-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_H5TEST
Expand Down Expand Up @@ -438,7 +438,7 @@ if (NOT CYGWIN)
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-cache-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-cache COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cache>)
else ()
add_test (NAME H5TEST-cache COMMAND "${CMAKE_COMMAND}"
Expand Down Expand Up @@ -512,7 +512,7 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-external_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_external_env)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-external_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:external_env>)
else ()
add_test (NAME H5TEST-external_env COMMAND "${CMAKE_COMMAND}"
Expand Down Expand Up @@ -547,7 +547,7 @@ add_test (
${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-vds_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_vds_env)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-vds_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:vds_env>)
else ()
add_test (NAME H5TEST-vds_env COMMAND "${CMAKE_COMMAND}"
Expand Down Expand Up @@ -594,7 +594,7 @@ add_test (NAME H5TEST-flush-clean-objects
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-flush-clean-objects PROPERTIES FIXTURES_CLEANUP clear_flush)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-flush1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:flush1>)
else ()
add_test (NAME H5TEST-flush1 COMMAND "${CMAKE_COMMAND}"
Expand All @@ -616,7 +616,7 @@ set_tests_properties (H5TEST-flush1 PROPERTIES
if ("H5TEST-flush1" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
set_tests_properties (H5TEST-flush1 PROPERTIES DISABLED true)
endif ()
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-flush2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:flush2>)
else ()
add_test (NAME H5TEST-flush2 COMMAND "${CMAKE_COMMAND}"
Expand Down Expand Up @@ -850,7 +850,7 @@ add_test (NAME H5TEST-links_env-clean-objects
${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-links_env-clean-objects PROPERTIES FIXTURES_CLEANUP clear_links_env)
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-links_env COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:links_env>)
else ()
add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
Expand Down
2 changes: 1 addition & 1 deletion testpar/CMakeVFDTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set (H5P_VFD_subfiling_TESTS_SKIP
)

macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (h5_test ${H5P_VFD_TESTS})
if (NOT "${h5_test}" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
add_test (
Expand Down
9 changes: 5 additions & 4 deletions tools/lib/h5diff_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,10 +1309,11 @@ all_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;

while (size-- > 0)
if (mem[size])
return false;

if (mem != NULL) {
while (size-- > 0)
if (mem[size])
return false;
}
return true;
}

Expand Down
9 changes: 5 additions & 4 deletions tools/lib/h5tools_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,10 +1587,11 @@ h5tools_str_is_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;

while (size-- > 0)
if (mem[size])
return false;

if (mem != NULL) {
while (size-- > 0)
if (mem[size])
return false;
}
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions tools/test/h5copy/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5
)
# If using memchecker add tests without using scripts
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
Expand Down Expand Up @@ -292,7 +292,7 @@
endmacro ()

macro (ADD_H5_UD_TEST testname resultcode infile sparam srcname dparam dstname cmpfile)
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5COPY_UD-${testname}-clear-objects
Expand Down Expand Up @@ -366,7 +366,7 @@
endmacro ()

macro (ADD_H5_UD_ERR_TEST testname resultcode infile sparam srcname dparam dstname cmpfile)
if (NOT HDF5_USING_ANALYSIS_TOOL)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5COPY_UD_ERR-${testname}-clear-objects
Expand Down Expand Up @@ -443,12 +443,12 @@

macro (ADD_SIMPLE_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_USING_ANALYSIS_TOOL)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5COPY-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy> ${ARGN})
if (${resultcode})
set_tests_properties (H5COPY-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
else (HDF5_USING_ANALYSIS_TOOL)
else ()
add_test (
NAME H5COPY-${resultfile}
COMMAND "${CMAKE_COMMAND}"
Expand Down
Loading
Loading