From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>, Sergey Bronnikov <sergeyb@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH luajit 7/7] test: set LD_PRELOAD only when necessary Date: Mon, 23 Sep 2024 10:18:53 +0300 [thread overview] Message-ID: <91a2e13a36abed3f03851b618f948eb2ff7d534f.1727074292.git.skaplun@tarantool.org> (raw) In-Reply-To: <cover.1727074292.git.skaplun@tarantool.org> This patch sets LD_PRELOAD for ASan build for the required tests instead of all tests. Follows up tarantool/tarantool#9898 --- test/tarantool-tests/CMakeLists.txt | 33 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index fe1d8165..d4c7a5a0 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -77,21 +77,6 @@ make_lua_path(LUA_PATH set(LUA_TEST_SUFFIX .test.lua) -# Some tests use `LD_PRELOAD` to mock system calls (like -# <lj-802-panic-at-mcode-protfail.test.lua> overwrites -# `mprotect()`. When compiling with ASan support under GCC, it is -# required that the ASan library go first in the `LD_PRELOAD` -# list. Set it manually. The test will append it to the executed -# process. -if(LUAJIT_USE_ASAN AND CMAKE_C_COMPILER_ID STREQUAL "GNU") - # FIXME: We should set this environment variable only - # for the corresponding tests to avoid warnings from - # the GNU libc and other libc implementations. - # See https://github.com/tarantool/tarantool/issues/9898. - LibRealPath(LIB_ASAN libasan.so) - list(APPEND LUA_TEST_ENV_MORE LD_PRELOAD=${LIB_ASAN}) -endif() - # FIXME: This is needed for disabling some flaky tests (like # profilers), until LuaJIT/LuaJIT#606 will not be resolved. if(LUAJIT_ENABLE_TABLE_BUMP) @@ -191,3 +176,21 @@ foreach(test_name ${profilers_tests}) LUA_PATH "${PROJECT_SOURCE_DIR}/tools/?.lua\;" ) endforeach() + +# Some tests use `LD_PRELOAD` to mock system calls (like +# <lj-802-panic-at-mcode-protfail.test.lua> overwrites +# `mprotect()`). When compiling with ASan support under GCC, it is +# required that the ASan library go first in the `LD_PRELOAD` +# list. Set it manually. The test will append it to the executed +# process. +if(LUAJIT_USE_ASAN AND CMAKE_C_COMPILER_ID STREQUAL "GNU") + LibRealPath(LIB_ASAN libasan.so) + AppendTestEnvVar( + "test/${TEST_SUITE_NAME}/lj-522-fix-dlerror-return-null.test.lua" + LD_PRELOAD ${LIB_ASAN} + ) + AppendTestEnvVar( + "test/${TEST_SUITE_NAME}/lj-802-panic-at-mcode-protfail.test.lua" + LD_PRELOAD ${LIB_ASAN} + ) +endif() -- 2.46.0
prev parent reply other threads:[~2024-09-23 7:22 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-09-23 7:18 [Tarantool-patches] [PATCH luajit 0/7] Shrink test env and fix flaky tests Sergey Kaplun via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 1/7] test: move profilers tests to subdirectory Sergey Kaplun via Tarantool-patches 2024-09-23 7:40 ` Sergey Bronnikov via Tarantool-patches 2024-09-23 7:51 ` Sergey Kaplun via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 2/7] test: rename <arm64-ccall-fp-convention.test.lua> Sergey Kaplun via Tarantool-patches 2024-09-23 7:45 ` Sergey Bronnikov via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 3/7] cmake: introduce AppendTestEnvVar macro Sergey Kaplun via Tarantool-patches 2024-09-23 7:51 ` Sergey Bronnikov via Tarantool-patches 2024-09-23 8:18 ` Sergey Kaplun via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 4/7] test: shrink LUA_PATH environment variable Sergey Kaplun via Tarantool-patches 2024-09-23 8:47 ` Sergey Bronnikov via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 5/7] test: shrink LUA_CPATH and {DY}LD_LIBRARY_PATH Sergey Kaplun via Tarantool-patches 2024-09-23 7:18 ` [Tarantool-patches] [PATCH luajit 6/7] test: skip flaky tests with enabled table bump Sergey Kaplun via Tarantool-patches 2024-09-23 9:44 ` Sergey Bronnikov via Tarantool-patches 2024-09-23 11:08 ` Sergey Kaplun via Tarantool-patches 2024-09-23 7:18 ` Sergey Kaplun via Tarantool-patches [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=91a2e13a36abed3f03851b618f948eb2ff7d534f.1727074292.git.skaplun@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=m.kokryashkin@tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit 7/7] test: set LD_PRELOAD only when necessary' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox