<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hi, Sergey,<br>
</p>
<div class="moz-cite-prefix">On 24.09.2024 13:29, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3078cc813a6789de05ceb162093f40f5f48de455.1727172936.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">This patch sets LD_PRELOAD for ASan build for the required tests instead
of all tests.
Follows up tarantool/tarantool#9898</pre>
</blockquote>
<p>probably follows up these commits as well:<br>
</p>
<p><br>
</p>
<p>commit 9f1137bcc890c28c5de24497624553574d371007 "cmake:
replace prove with CTest"</p>
<p>commit abe1e0aca3ad01f89f9d184c2a82949314814d04 "ci: execute
LuaJIT tests with GCC 10 and ASAN"<br>
</p>
<p><br>
</p>
<p>LGTM<br>
</p>
<blockquote type="cite"
cite="mid:3078cc813a6789de05ceb162093f40f5f48de455.1727172936.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">
---
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 a1aee3a2..74086ca4 100644
--- a/test/tarantool-tests/CMakeLists.txt
+++ b/test/tarantool-tests/CMakeLists.txt
@@ -82,21 +82,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 <a class="moz-txt-link-freetext" href="https://github.com/tarantool/tarantool/issues/9898">https://github.com/tarantool/tarantool/issues/9898</a>.
- 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)
@@ -163,3 +148,21 @@ foreach(test_path ${tests})
endforeach()
endif()
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()
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>