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 D95C56EC5D; Tue, 6 Apr 2021 16:35:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D95C56EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617716141; bh=abBabqwuZ3DWSOxQkoOQcnCokJXiUUZZEiEKaRnnMx0=; 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=X6C3ks2cxYd6xBDeI08wCdtCZVzWDEd6IT11dwxBmqUDT58YlARboM3P5oE0EhW+d FRKaMecTwy0KZi493QvCith9FLMSmYQSMuZEcM/Puxt/Oof39ibs38QHx/S9T0sGoE MOQaksHPRKA6u/bwi/EaJH8idEgHv4sWp22UymEc= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 EE6AB6EC5D for ; Tue, 6 Apr 2021 16:35:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EE6AB6EC5D Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lTlrn-000170-RO; Tue, 06 Apr 2021 16:35:40 +0300 Date: Tue, 6 Apr 2021 16:35:29 +0300 To: Sergey Kaplun Message-ID: <20210406133529.GB29703@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E3294DD38BE31D7797EF84C856624A09E4809182A05F538085040DB184A601804B8AB51487FD8DD6B5075E5CB86BF239449DA2C3B8BDA670B4789 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73C871DD2182510D5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372CAA106849E7D531EA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC7664A05A28F4FE6001BE69DC329ABCA5545CFB50B931E2BF3F5E389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E5E764EB5D94DBD4CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7BEA0E1DB66A6FB7C731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A53AF5D6CEBA6B602A8B74BE523D5E2A474233B10E65CF72F2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34987A0E8D235BB5346220F9EEC953BD98DCBF3BDCCC8C77175BD83FBC14B557D74BC080DB7E05F2321D7E09C32AA3244CF57C274645324B56EEB247A74055C97564EE5813BBCA3A9D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojAX27rRizpLncPhcnLwgrIA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822974A1AB11FADB7CB3FC50A228981CD33A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] test: make utils.selfrun usage easier 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for your review! On 06.04.21, Sergey Kaplun wrote: > Igor, > > Thanks for the patch! > > LGTM, except a few nits below. Added your tag: | Reviewed-by: Sergey Kaplun > > Nit: I suggest to use `` for codenames mentions (if it is a function, then use > brackets, for example `function_name()`), and <> for filenames mentions > in the commit message and comments in the code. I personally don't like this style: it looks ugly at first. This is used neither for rendering commit messages (even on GitHub web interface) nor for doc related postprocessing, so I see no motivation to write something like this. > This style has already been used for lua-Harness suite. I would like ask you not to use this notation there, but we had no words regarding it in our Tarantool style guide, so I couldn't stop you from writing commit messages the way you want. Finally, we have no guide for LuaJIT sources and patches for now. > Thoughts? It would be nice to come to agreement about using the similar style in writing plain text messages, but definitely not such ugly one. > > On 05.04.21, Igor Munkin wrote: > > Previous implementation of implicitly obliges the > > developer to pass the arguments to the test script for the second run. > > This has been unnoticed, since the existing tests are invoked for two > > different cases, so the script arguments were kinda obligatory, but they > > are not required in a general case. > > > > As a result the function signals the testing system that the script is > > being run the second time via TEST_SELFRUN environment variable. > > > > Signed-off-by: Igor Munkin > > --- > > .../gh-4427-ffi-sandwich.test.lua | 51 +++++++++---------- > > .../lj-flush-on-trace.test.lua | 51 +++++++++---------- > > test/tarantool-tests/utils.lua | 7 +++ > > 3 files changed, 57 insertions(+), 52 deletions(-) > > > > diff --git a/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua b/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua > > index 56363608..64df5dbd 100644 > > --- a/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua > > +++ b/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua > > @@ -1,31 +1,30 @@ > > > > > +----- Test payload. ------------------------------------------------------------ > > Typo? comment length is too long, isn't it? Well... I did it unintentionally: just typed 80a- in my text editor :) > But, in other side, we already have the 80-symbols comments inside > ... > But, we have no strict code style for LuaJIT part of the code. So: Yes, we have not, but let's follow Tarantool guidelines for now. I left the comment but stripped it up to 66 symbols in both chunks. > Feel free to ignore. > > > > > local cfg = { > > hotloop = arg[1] or 1, > > diff --git a/test/tarantool-tests/utils.lua b/test/tarantool-tests/utils.lua > > index aebbf6ac..d2dd71b0 100644 > > --- a/test/tarantool-tests/utils.lua > > +++ b/test/tarantool-tests/utils.lua > > @@ -14,6 +14,12 @@ local function luacmd(args) > > end > > > > function M.selfrun(arg, checks) > > + -- If TEST_SELFRUN is set, just execute the test payload below > > + -- call, ... > > + if os.getenv('TEST_SELFRUN') then return end > > Typo? should we avoid inline return, shouldn't we? No, it's not. There is the similar usage in , and I just follow the style. BTW, there are comments around this block, so I hope this is not a problem for the reader. > > > + > > + -- ... otherwise run this chunk via . > > + > > local test = tap.test(arg[0]:match('/?(.+)%.test%.lua')) > > > > test:plan(#checks) > > @@ -28,6 +34,7 @@ function M.selfrun(arg, checks) > > local cmd = string.gsub('LUA_PATH="/?.lua;$LUA_PATH" ' .. > > 'LUA_CPATH="/?.;$LUA_CPATH" ' .. > > 'LD_LIBRARY_PATH=:$LD_LIBRARY_PATH ' .. > > + 'TEST_SELFRUN=1' .. > > ' 2>&1