From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id C2A49C9DF9B; Mon, 23 Sep 2024 10:22:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C2A49C9DF9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1727076167; bh=876/3ZNuAmfvq+bhq7qPCxg5qBHYZB/6B67CCEI8Rvk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=W5scAaCACLCbkXM/fLX/V/zTJhDm8s3ajAMdkNPMkFeZ8O4jUudzCJEFGFqHJD/bu MdJKmktil1xPfRpsv9v3SGhzfB8fpOppW9DganMaMVVOOPwwmwpzLIt/uvUUdFX6id PKGTxMsQwPmzdByRaysBjqDgUllS/NR+yHiDkFNU= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [95.163.41.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 62F6DCC8EAD for ; Mon, 23 Sep 2024 10:19:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 62F6DCC8EAD Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1ssdLu-0000000C9Sx-0KgR; Mon, 23 Sep 2024 10:19:22 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Mon, 23 Sep 2024 10:18:53 +0300 Message-ID: <91a2e13a36abed3f03851b618f948eb2ff7d534f.1727074292.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD96E52E9D942F25A5F8302628C0FA5BF3DA7430A5D3A2DFF1000894C459B0CD1B955726486D940F42DC23CA552186D3265BC0BDFA132574936693F64E413CBBBEE4DA8AD57119ECC7B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A72B1EA4C8D5AD81EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063788D52F6B124E194E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8A7CA8B664286541AA57B93FDDFD97B7541BEDECD8FE5935CCC7F00164DA146DAFE8445B8C89999728AA50765F7900637876557C5A8D58DD0389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC87BD21ED50D08CA4DF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CABB3490C75E89280302FCEF25BFAB3454AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C31D04D3D2E8C2E24EBA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6D082881546D9349175ECD9A6C639B01B78DA827A17800CE7888FFA144A8AE6D0731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5335FEB3E0C8EAD565002B1117B3ED696047327BE73343DCABFF4097FFC9E796F823CB91A9FED034534781492E4B8EEADD0953842B444AAC3C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34A5BF8FA0BD61F9941F986E13F94C8AD446078C0594BA6D8B00523BDAE78957C815B198C73E4542601D7E09C32AA3244CC6CA21DC3CDB1D104EB7DF677E51682DBD66A51BDA563A14EA455F16B58544A21C197AAF4D2E4732A5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcsBYxvRMKewIA7P/afXe0A== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B5908D300E9D36908C30578E6996F3834136B05DB489C75C3CEB7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 7/7] test: set LD_PRELOAD only when necessary X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 -# 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 +# 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