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 967E9E3204A; Tue, 24 Sep 2024 13:33:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 967E9E3204A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1727174022; bh=94GfcsCwzdHZ4CFYyAG2oe5FA25VASoHw3GPb4vtPtM=; 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=rSgO47+aEXuciXR0ITkHKayqaqbnj2Jm7YqR4eXBpHyLNvuojcX3wBGJYpp1VgOon +RcOcwb6dkiVcSU8xDbAwKM1ZnKfjpQDc3nhQ/c7Y2JXgIBhgjdGPjmrom1mKcEnm1 bHB8XfNFhD4MMwp339XVqaSja/FADRPRVNzcCNBQ= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [95.163.41.86]) (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 6BD80E3204A for ; Tue, 24 Sep 2024 13:30:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6BD80E3204A Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1st2oD-000000024Sz-1DCi; Tue, 24 Sep 2024 13:30:17 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Tue, 24 Sep 2024 13:29:52 +0300 Message-ID: <3078cc813a6789de05ceb162093f40f5f48de455.1727172936.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: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD941CBEC3D08EBAA0971DA4E6AFD7BE56DAC55D89031953764182A05F5380850404C228DA9ACA6FE27C053177753047360F378A8CA21F699D691DE8B4A0D30C376136038D1A3840DCD644255FD46611E48 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71F31443D278F8A69EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063742E71BDDD354FC988638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8DCE09F7D6201FF8C47D5332523126BA1FB6CBA932F7B77D9CC7F00164DA146DAFE8445B8C89999728AA50765F790063796D31E89718C7775389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8C6602A96AF88C695F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B53A69B3AC30C7B9475ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5B9B713E2D7C062D75002B1117B3ED69651EC08E088BA39A5B2920F75BA9A967F823CB91A9FED034534781492E4B8EEADD0953842B444AAC3C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34EB7BD66E9101C100ECD21233F7F0DE325E5917A5978FB88B9CA5AEAF9EF5259CB7BD62A9815B19801D7E09C32AA3244CEE540B9907C0FF3986B83C6DB07BF3AEE362BAAFFCE007FBEA455F16B58544A21C197AAF4D2E4732A5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojamSMdo1tbG+g8gsuis3htA== X-DA7885C5: A4DB88C44D9649FBF255D290C0D534F901738B47CEF6F1813B0EF77459AA63808F6748DA01420AFD5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B32B858DAE886C69B598E7FB0904C86B30F504F6B12CE300BE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 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 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 -# 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) @@ -163,3 +148,21 @@ foreach(test_path ${tests}) endforeach() endif() 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