Skip to content

Commit

Permalink
tests: disable test_backtrace under asan
Browse files Browse the repository at this point in the history
Backtracing doesn't seem to be compatible to address sanitizing. So we
disable the backtrace test if asan is enabled.
  • Loading branch information
arogge committed Feb 24, 2022
1 parent 1813d6d commit 89f6df9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/tests/CMakeLists.txt
Expand Up @@ -321,6 +321,13 @@ if(HAVE_EXECINFO_H
AND HAVE_BACKTRACE_SYMBOLS
)
bareos_add_test(test_backtrace LINK_LIBRARIES bareos GTest::gtest_main)
# Backtrace doesn't work correctly when ASan is enabled, do we shoudn't test
# in that case
if(CMAKE_CXX_FLAGS MATCHES "-fsanitize=address")
set_tests_properties(
gtest:Backtrace.test_backtrace PROPERTIES DISABLED TRUE
)
endif()
endif() # HAVE_EXECINFO_H ..

if(NOT client-only)
Expand Down

0 comments on commit 89f6df9

Please sign in to comment.