This repository was archived by the owner on Mar 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ option(CHECK_CPP_STYLE "check code style of C++ sources" OFF)
7878option (TRACE_TESTS "more verbose test outputs" OFF )
7979option (USE_ASAN "enable AddressSanitizer (debugging)" OFF )
8080option (USE_UBSAN "enable UndefinedBehaviorSanitizer (debugging)" OFF )
81- option (USE_LIBUNWIND "use libunwind for more reliable stack traces from tests (if available)" ON )
81+ option (USE_LIBUNWIND "use libunwind for more reliable stack traces from tests (if available); see README file if tests fail with libunwind " ON )
8282option (USE_CCACHE "use ccache if it is available in the system" ON )
8383
8484option (TESTS_USE_FORCED_PMEM "run tests with PMEM_IS_PMEM_FORCE=1 - it speeds up tests execution on emulated pmem" OFF )
Original file line number Diff line number Diff line change @@ -97,6 +97,24 @@ $ make
9797# make install
9898```
9999
100+ ** Note:**
101+ By default CMake's option ` USE_LIBUNWIND ` is switched ON. If libunwind package was found
102+ in the system, it is then linked to all tests' binaries. Sometimes this may lead to
103+ failing a test, if it is run under Valgrind. To avoid this false-positive fails, you can
104+ execute tests run under Valgrind separately, without libunwind:
105+
106+ ``` sh
107+ cmake .. -DTESTS_USE_VALGRIND=ON -DUSE_LIBUNWIND=OFF && \
108+ ctest -R " _helgrind|_pmemcheck|_drd|_memcheck|_pmreorder" # run only valgrind tests
109+ ```
110+
111+ or valgrind tests can be disabled in CMake build:
112+
113+ ``` sh
114+ cmake .. -DTESTS_USE_VALGRIND=OFF && \
115+ ctest
116+ ```
117+
100118### Developer compilation
101119``` sh
102120$ mkdir build
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ TESTS_PACKAGES=${TESTS_PACKAGES:-ON}
2323TESTS_USE_FORCED_PMEM=${TESTS_USE_FORCED_PMEM:- ON}
2424TESTS_ASAN=${TESTS_ASAN:- OFF}
2525TESTS_UBSAN=${TESTS_UBSAN:- OFF}
26- TESTS_VALGRIND_UNWIND=${TESTS_VALGRIND_UNWIND:- OFF}
26+ TESTS_VALGRIND_UNWIND=${TESTS_VALGRIND_UNWIND:- OFF} # turn unwind off, when building with valgrind tests=ON
2727TEST_TIMEOUT=${TEST_TIMEOUT:- 600}
2828
2929export PMREORDER_STACKTRACE_DEPTH=20
You can’t perform that action at this time.
0 commit comments