Skip to content

cmake: support ASAN and LSAN#11056

Draft
ligurio wants to merge 4 commits intotarantool:masterfrom
ligurio:ligurio/gh-xxxx-ctest-asan
Draft

cmake: support ASAN and LSAN#11056
ligurio wants to merge 4 commits intotarantool:masterfrom
ligurio:ligurio/gh-xxxx-ctest-asan

Conversation

@ligurio
Copy link
Member

@ligurio ligurio commented Jan 27, 2025

Depends on #11004

NO_CHANGELOG=build
NO_DOC=build
NO_TEST=build

@ligurio ligurio requested a review from Totktonada as a code owner January 27, 2025 11:45
@ligurio ligurio marked this pull request as draft January 27, 2025 11:45
@coveralls
Copy link

coveralls commented Jan 27, 2025

Coverage Status

coverage: 87.583% (-0.006%) from 87.589%
when pulling 194ae4a on ligurio:ligurio/gh-xxxx-ctest-asan
into 2502633
on tarantool:master
.

@ligurio ligurio mentioned this pull request Feb 5, 2025
15 tasks
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch 2 times, most recently from 8bd3d02 to 5e64868 Compare March 3, 2025 13:24
@ligurio ligurio added the do not merge Not ready to be merged label Mar 3, 2025
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch from 5e64868 to 48feabf Compare March 17, 2025 14:28
@ligurio ligurio added the full-ci Enables all tests for a pull request label Mar 17, 2025
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch 3 times, most recently from fdbd8ef to f6640b1 Compare March 18, 2025 09:35
ligurio added a commit to ligurio/nanodata that referenced this pull request Mar 28, 2025
The commit 8ad443d
("cmake: introduce a module to build fuzzing tests") has added
tests for LuaJIT. These tests mostly written in C and tests
LuaJIT via Lua C API. The patch integrates tests that written in
Lua and tests LuaJIT via Lua API, see [1].

Depends on:

1. ligurio/lunapark#121
2. tarantool#11056

NO_CHANGELOG=testing
NO_DOC=testing
ligurio added a commit to ligurio/nanodata that referenced this pull request Apr 9, 2025
The commit 8ad443d
("cmake: introduce a module to build fuzzing tests") has added
tests for LuaJIT. These tests mostly written in C and tests
LuaJIT via Lua C API. The patch integrates tests that written in
Lua and tests LuaJIT via Lua API, see [1].

Depends on:

1. ligurio/lunapark#121
2. tarantool#11056

NO_CHANGELOG=testing
NO_DOC=testing
ligurio added a commit to ligurio/nanodata that referenced this pull request May 14, 2025
The commit 8ad443d
("cmake: introduce a module to build fuzzing tests") has added
tests for LuaJIT. These tests mostly written in C and tests
LuaJIT via Lua C API. The patch integrates tests that written in
Lua and tests LuaJIT via Lua API, see [1].

Depends on:

1. ligurio/lunapark#121
2. tarantool#11056

NO_CHANGELOG=testing
NO_DOC=testing
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch from f6640b1 to 9e9ff04 Compare August 6, 2025 16:04
The commit 52b82bd ("build: configure parallel jobs")
calculates optimal parallel level that depends on CPU number
and sets that number as CMAKE_BUILD_PARALLEL_LEVEL. The patch
removes calculating NPROC in .test.mk, because after
aforementioned commit it is not needed.

Follows up commit 52b82bd ("build: configure parallel jobs").

NO_CHANGELOG=ci
NO_DOC=ci
NO_TEST=ci
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch 2 times, most recently from faa77da to 23d7fd0 Compare August 6, 2025 16:17
ligurio added 3 commits August 6, 2025 19:32
Running tests with enabled ASAN and LSAN requires defining a
number of environment variables (like a path to a file with
suppressions or custom sanitizers flags). These environment
variables are defined in .test.mk and therefore it is complicated
to use these variables with CTest. The patch moves environment
variables to `cmake/profile.cmake` and sets them in targets with
test-run.py and tests for CTest.

NO_CHANGELOG=testing
NO_DOC=testing
Fixes #
Closes #
Needed for #
See also #

NO_CHANGELOG=internal
NO_DOC=internal
NO_TEST=internal
There is a tool named `direnv` [1], it is an extension for shell,
that can load and unload environment variables depending on the
current directory. Running regression tests with enabled ASAN and
LSAN requires setting environment variables. CTest set these
variables in each test, but for running `tarantool` it is reqired
setting these variables manually. `direnv` and autogenerated
`.envrc` solves this problem - CMake automatically generates
a file with actual settings, `direnv` loads this file as soon as
a current directory changed to a PROJECT_SOURCE_DIR.

Note, the command `direnv allow` must be executed for loading
updated `.envrc`.

1. https://direnv.net/

NO_CHANGELOG=testing
NO_DOC=testing
NO_TEST=testing
@ligurio ligurio force-pushed the ligurio/gh-xxxx-ctest-asan branch from 23d7fd0 to 194ae4a Compare August 6, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Not ready to be merged full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants