Skip to content

Commit

Permalink
Fixes and cleanup for ph5diff
Browse files Browse the repository at this point in the history
Fixes concurrency issues in ph5diff that can cause interleaved
output

Fixes an issue where output can sometimes be dropped if it ended
up in ph5diff's output overflow file

Fixes an issue where MPI_Init is called after HDF5 has been
initialized, preventing the library from setting up an MPI
attribute to perform cleanup on MPI_Finalize

Fixes an issue in config/cmake/runTest.cmake where the CMake
logic would try to access an invalid list index if the number
of lines in a test's output and reference files don't match
  • Loading branch information
jhendersonHDF committed Apr 7, 2024
1 parent 7349023 commit e8418d2
Show file tree
Hide file tree
Showing 3 changed files with 335 additions and 400 deletions.
22 changes: 16 additions & 6 deletions config/cmake/runTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,22 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
if (NOT str_act STREQUAL str_ref)
if (str_act)
set (TEST_COMPARE_RESULT 1)
message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
if (line GREATER_EQUAL len_act)
message (STATUS "COMPARE FAILED: ran out of lines in ${TEST_FOLDER}/${TEST_OUTPUT}")
set (TEST_COMPARE_RESULT 1)
break ()
elseif (line GREATER_EQUAL len_ref)
message (STATUS "COMPARE FAILED: ran out of lines in ${TEST_FOLDER}/${TEST_REFERENCE}")
set (TEST_COMPARE_RESULT 1)
break ()
else ()
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
if (NOT str_act STREQUAL str_ref)
if (str_act)
set (TEST_COMPARE_RESULT 1)
message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
endif ()
endif ()
endif ()
endforeach ()
Expand Down
Loading

0 comments on commit e8418d2

Please sign in to comment.