diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2023-12-22 00:28:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-08 20:25:57 (GMT) |
commit | fe1903326c1903fc67fad8b504dcf8574200694d (patch) | |
tree | 749e0e87d445136109ef45a6bd0c19892c6e3302 /Tests | |
parent | b7f9d24b40a486da946ce86795c3105899c19842 (diff) | |
download | CMake-fe1903326c1903fc67fad8b504dcf8574200694d.zip CMake-fe1903326c1903fc67fad8b504dcf8574200694d.tar.gz CMake-fe1903326c1903fc67fad8b504dcf8574200694d.tar.bz2 |
Tests: Avoid procedure stack overflow in broken libc on Elbrus
On E2K architecture, there is at least one known version of libc
that is built with a bug that leads to a kernel error like
`procedure stack could not be copied` visible in `dmesg` in several
tests (and such test immediately receives `SIGSEGV` and fails).
It was first detected in !8665, and after a long investigation,
the culprit was finally found (MCST bugzilla internal bug 124224).
Avoid running tests known to fail if such a version of libc is detected.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index e218169..cbd9cbc 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -1050,6 +1050,31 @@ set(cpack_tests if(APPLE) list(APPEND cpack_tests DragNDrop) endif() + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" AND NOT DEFINED CMake_TEST_E2K_BROKEN_LIBC) + # Exclude tests that fail due to a broken libc version on Elbrus. + find_program(DPKG_QUERY "dpkg-query" ) + execute_process(COMMAND "${DPKG_QUERY}" "-f" "\${Version}" "-W" "glibc" OUTPUT_VARIABLE LIBC_VERSION) + if(LIBC_VERSION MATCHES "2.29-25.*") + list(REMOVE_ITEM cpack_tests + DEB.AUTO_SUFFIXES + DEB.CUSTOM_NAMES + DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY + DEB.PROJECT_META DEB.DEPENDENCIES + RPM.PARTIALLY_RELOCATABLE_WARNING + RPM.PER_COMPONENT_FIELDS + RPM.USER_FILELIST + RPM.DIST + RPM.AUTO_SUFFIXES + TGZ + ZIP + STGZ + External + ) + set(CMake_TEST_E2K_BROKEN_LIBC 1) + endif() +endif() + add_RunCMake_test_group(CPack "${cpack_tests}") # add a test to make sure symbols are exported from a shared library # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used @@ -1104,14 +1129,16 @@ add_RunCMake_test(CMakePresetsBuild -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} ) -add_RunCMake_test(CMakePresetsTest - -DPython_EXECUTABLE=${Python_EXECUTABLE} - -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} - ) -add_RunCMake_test(CMakePresetsPackage - -DPython_EXECUTABLE=${Python_EXECUTABLE} - -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} - ) +if(NOT CMake_TEST_E2K_BROKEN_LIBC) + add_RunCMake_test(CMakePresetsTest + -DPython_EXECUTABLE=${Python_EXECUTABLE} + -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} + ) + add_RunCMake_test(CMakePresetsPackage + -DPython_EXECUTABLE=${Python_EXECUTABLE} + -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} + ) +endif() add_RunCMake_test(CMakePresetsWorkflow -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} |