diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-03-12 15:41:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-12 15:41:15 (GMT) |
commit | a06b7ebb34d3ec2e883dce77bb87a6770d141fa1 (patch) | |
tree | 014bac7250345fe44aa9e03eb6f6b62a817dff61 | |
parent | a1de01d07eb069dcc342fa4238a05e2489d7f009 (diff) | |
download | hdf5-a06b7ebb34d3ec2e883dce77bb87a6770d141fa1.zip hdf5-a06b7ebb34d3ec2e883dce77bb87a6770d141fa1.tar.gz hdf5-a06b7ebb34d3ec2e883dce77bb87a6770d141fa1.tar.bz2 |
1.10 Fix release check version logic #1438 (#1494)
* Fix release check version logic #1438
* Correct list comment
-rwxr-xr-x | config/cmake/scripts/HDF5config.cmake | 4 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 17 | ||||
-rw-r--r-- | src/H5.c | 14 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 2 |
4 files changed, 26 insertions, 11 deletions
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 6a83db4..7a8d472 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -68,7 +68,7 @@ endif () # build generator must be defined if (NOT DEFINED BUILD_GENERATOR) - message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2019, VS201964, VS2017, or VS201764, VS2015, VS201564") + message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564") endif () ################################################################### @@ -163,7 +163,7 @@ if (NOT DEFINED HPC) set (SITE_COMPILER_NAME "vs2012") set (SITE_COMPILER_VERSION "11") else () - message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2019, VS201964, VS2017, or VS201764, VS2015, VS201564") + message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2019, VS201964, VS2017, VS201764, VS2015, VS201564") endif () ## Set the following to unique id your computer ## set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX") diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b29e834..0566ba4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -126,6 +126,23 @@ Bug Fixes since HDF5-1.10.7 release =================================== Library ------- + - Issue #1436 identified a problem with the H5_VERS_RELEASE check in the + H5check_version function. + + Investigating the original fix, #812, we discovered some inconsistencies + with a new block added to check H5_VERS_RELEASE for incompatibilities. + This new block was not using the new warning text dealing with the + H5_VERS_RELEASE check and would cause the warning to be duplicated. + + By removing the H5_VERS_RELEASE argument in the first check for + H5_VERS_MAJOR and H5_VERS_MINOR, the second check would only check + the H5_VERS_RELEASE for incompatible release versions. This adheres + to the statement that except for the develop branch, all release versions + in a major.minor maintenance branch should be compatible. The prerequisite + is that an application will not use any APIs not present in all release versions. + + (ADB - 2022/03/11, #1438) + - Unified handling of collective metadata reads to correctly fix old bugs Due to MPI-related issues occurring in HDF5 from mismanagement of the @@ -821,6 +821,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) static int checked = 0; /* If we've already checked the version info */ static unsigned int disable_version_check = 0; /* Set if the version check should be disabled */ static const char * version_mismatch_warning = VERSION_MISMATCH_WARNING; + static const char * release_mismatch_warning = RELEASE_MISMATCH_WARNING; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API_NOINIT_NOERR_NOFS @@ -841,10 +842,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) } /* H5_VERS_MAJOR and H5_VERS_MINOR must match */ - /* Cast relnum to int to avoid warning for unsigned < 0 comparison - * in first release versions */ - if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum || H5_VERS_RELEASE > (int)relnum) { - + if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum) { switch (disable_version_check) { case 0: HDfprintf(stderr, "%s%s", version_mismatch_warning, @@ -879,7 +877,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) break; } /* end switch */ - } /* end if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum || H5_VERS_RELEASE > relnum) */ + } /* end if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum) */ /* H5_VERS_RELEASE should be compatible, we will only add checks for exceptions */ if (H5_VERS_RELEASE != relnum) { @@ -889,7 +887,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) switch (disable_version_check) { case 0: HDfprintf( - stderr, "%s%s", version_mismatch_warning, + stderr, "%s%s", release_mismatch_warning, "You can, at your own risk, disable this warning by setting the environment\n" "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n" "Setting it to 2 or higher will suppress the warning messages totally.\n"); @@ -908,7 +906,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) "%s'HDF5_DISABLE_VERSION_CHECK' " "environment variable is set to %d, application will\n" "continue at your own risk.\n", - version_mismatch_warning, disable_version_check); + release_mismatch_warning, disable_version_check); /* Mention the versions we are referring to */ HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, @@ -986,7 +984,7 @@ done: /*------------------------------------------------------------------------- * Function: H5close * - * Purpose: Terminate the library and release all resources. + * Purpose: Terminate the library and release all resources. * * Return: Non-negative on success/Negative on failure * diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f821c47..9178e4e 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -704,7 +704,7 @@ set_tests_properties (H5TEST-tcheck_version-minor PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST WILL_FAIL "true" ) -# release + 1 should pass +# release + 1 should pass on non-develop branches add_test (NAME H5TEST-tcheck_version-release COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:tcheck_version> "-tr") set_tests_properties (H5TEST-tcheck_version-release PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST |