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 C89CA46B100; Mon, 22 May 2023 14:03:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C89CA46B100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1684753421; bh=1HaRG42cfWnXgVehVGVDcU2Z5wLYoU0aD/qv+zi8MaY=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=a/am5A4hjwaYmc4q2QtQbZD4vAjYLOssnLtMWIUzWpfPhh+vhOEWIACmLR4EbrqVi pgx51ZtLi7mwjoZG3SdTS+sHKkNRUxvp1TQFP5Y+MIeWDJWfyVTGUXp80SHkiT8Fab r7+EvGw8onUp0ssunMb1J9l3sPcfYxh33yePI8zM= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [95.163.41.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E630B46B100 for ; Mon, 22 May 2023 14:03:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E630B46B100 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1q13KE-002lvS-TB; Mon, 22 May 2023 14:03:39 +0300 Message-ID: <30f947ca-eddc-0804-9c42-400d5ff15ea2@tarantool.org> Date: Mon, 22 May 2023 14:03:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: Sergey Kaplun , Igor Munkin , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <848c82043f91fcaa4883c711cfa85bf1a1bc9959.1684442182.git.skaplun@tarantool.org> Content-Language: en-US In-Reply-To: <848c82043f91fcaa4883c711cfa85bf1a1bc9959.1684442182.git.skaplun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD921E8753A900160F1CF01BC910163A817574ED0228E619E23182A05F538085040FE5A5727D1F0AD7FDA45A4C618A167CA70D3AC741BBCDEDB5F1C514BDDA30C67 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72791110C931D1596EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637429DFC3C702CBFCC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87FD9A544456418DDD32772BDC9117550117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCECD08F8D939B2CE4A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735208B49E537791A9F7DC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE652FD71AFB96DC7D846F39228950D27DD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE30085B890FD2717DA6E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637A7EFCB0EB5ACB161EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A56F51AA8EF51B0938D689524408C4EDD9E63AC926411A53ECF87CCE6106E1FC07E67D4AC08A07B9B0A6C7FFFE744CA7FBCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D3444047AE358B407544ABDF3C7F3189435B245CA99A6CD63F4FC14CC99499626A12BEA0F22B30788591D7E09C32AA3244CD3AAA2223E5D3FA651C3DAF1AAB7EB4B795D98D676DD64D0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojsZq9uZIzxfZvkXkKflj66w== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A76922FAD89994DA2F1DDA45A4C618A167CA84876E3DC5E244DFEBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 1/6] test: fix setting of {DY}LD_LIBRARY_PATH variables 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch. See one comment below. On 5/18/23 23:44, Sergey Kaplun wrote: > When we set `LUA_TEST_ENV_MORE` variable to be used in the additional > env command for run testing if `"` is used to wrap the `LD_LIBRARY_PATH` > value the content of this environment variable is literally > `"/abs/path1:/abs/path2:...:"`. So, the first entry is treated as the > relative path starting with `"`. In that case if we need the library to > be loaded via FFI for this particular test, that loading fails with the > error "cannot open shared object file", since the path to it is > incorrect. > > This patch removes `"` wrapping for the aforementioned variables. > --- > test/tarantool-tests/CMakeLists.txt | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt > index a428d009..38d6ae49 100644 > --- a/test/tarantool-tests/CMakeLists.txt > +++ b/test/tarantool-tests/CMakeLists.txt > @@ -102,6 +102,11 @@ endif() > # loaded modules on MacOS instead of shared libraries as it is > # done on Linux and BSD, another environment variable should be > # used to guide while searching the extension. > +# XXX: Be noticed that we shouldn't use `"` here to wrap > +# the variable's content. If we do this, the variable value will > +# contain `"` at the beginning and the end, so this `"` at the > +# beginning will be treated as the directory for the first entry > +# (the last subdirectory added). > if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") > # XXX: Apple tries their best to "protect their users from > # malware". As a result SIP (see the link[1] below) has been > @@ -122,9 +127,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") > # > # [1]: https://support.apple.com/en-us/HT204899 > # [2]: https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html > - list(APPEND LUA_TEST_ENV_MORE DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}") > + list(APPEND LUA_TEST_ENV_MORE DYLD_LIBRARY_PATH=${LD_LIBRARY_PATH}) > else() > - list(APPEND LUA_TEST_ENV_MORE LD_LIBRARY_PATH="${LD_LIBRARY_PATH}") > + list(APPEND LUA_TEST_ENV_MORE LD_LIBRARY_PATH=${LD_LIBRARY_PATH}) LUA_TEST_ENV_MOREĀ  then will be passed to a shell for execution. I suspect that command line execution will be broken when env variable will contain non-escaped whitespaces. It should be quoted or whitespaces should be escaped. So I propose to escape whitespaces with backward slashes, see [1]. 1. https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-can-i-get-quoting-and-escapes-to-work-properly > endif() > > # LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list