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 B61A745ECC8; Tue, 23 May 2023 09:51:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B61A745ECC8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1684824691; bh=NC0wVp6yRJzPU9UU5788h23jZ2E0vNeLM2Kqgyyb/Ro=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kIZnc8rY5Ugn2xvVaWw0pD7hDQZ9dW6tZtrDZwEWqFnXPGu4XVeGfWT2EPEbR2Jdu rHXQm5mu3hCGbrx279lI93mSZ7ANSl85cHNwsABEzx3XkbzUkDcNKBJ5OG2XRSpwrv km5dj6+MfS2CD1e0mKMpmIxoN0PX0ug6nHtHjBrk= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 B38124195A5 for ; Tue, 23 May 2023 09:51:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B38124195A5 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1q1Lri-0005FO-48; Tue, 23 May 2023 09:51:27 +0300 Date: Tue, 23 May 2023 09:47:19 +0300 To: Sergey Bronnikov Message-ID: References: <848c82043f91fcaa4883c711cfa85bf1a1bc9959.1684442182.git.skaplun@tarantool.org> <30f947ca-eddc-0804-9c42-400d5ff15ea2@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30f947ca-eddc-0804-9c42-400d5ff15ea2@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9318AAE2601AA39B8F9E13B3EDDC277FCF2D3D0BFAE7215B300894C459B0CD1B985DEDE70AE13B6430E53C7C062BF7123055ADCAA9271E89F409B4009A0DB8B7F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A72B1EA4C8D5AD81EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063761B0653E4D5FA7998638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D893CF643D8D31B2A893AD10FA1A1E89B7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC8B02E85A1983BE4A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735200AC5B80A05675ACD6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5B13DDB84045C1A5FAEF438E69A1F3CFCDEB0B62E64BF45EEF87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFC0D26735D0092CB79AF6C00C9110C4C6BAE84BAA5B1566BFCA2FEA0B01E9EDFFCFC48FC8A09AC855D5191E2618EE498CD9A969D8D1500EC255FE45D8D0DDD95CF4E8A8FB6BF8EBF5 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojzY8FQurh3bD6IX30yNrtXA== X-DA7885C5: 472C1D828A984D5C0A4489D76893C50B2C62A58B4628C89E065BFA33D692F6FF262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B5E84F02652486B3A2D8ACECD48588DA30FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 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 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" Hi, Sergey! Thanks for the review! On 22.05.23, Sergey Bronnikov wrote: > 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]. Yes, but we have some other problems with whitespaces already: | Could not execute (/home/burii/reviews/luajit/dir\ space/src/luajit -e dofile[[/home/burii/reviews/luajit/dir;space/test/luajit-test-init.lua]] /home/burii/rev | iews/luajit/dir): open3: exec of /home/burii/reviews/luajit/dir\ space/src/luajit -e dofile[[/home/burii/reviews/luajit/dir;space/test/luajit-test-init.lua]] / | home/burii/reviews/luajit/dir failed: No such file or directory at /usr/lib64/perl5/5.34/TAP/Parser/Iterator/Process.pm line 165. I suppose we can cover all such cases in the separate patchset. > > > 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 -- Best regards, Sergey Kaplun