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 D0229CC309; Thu, 21 Jan 2021 15:57:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D0229CC309 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611233873; bh=+Zn+B1Vvz9qbxuiyK6xYF6EAB6pMcDp0QMqUnkGhxeA=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=xDGdd8OIaq52NGf6in6tWsfuqd3JvDstpLfUDFuOEK7PE57HELPx5BBzza/5O2XH+ lu6aJZqilH4OcUb83EeTHc6qn9oJoF8cpGXlOSYryhL8zOU2uXi0Feh2kkUjIidShK IHlW7ts1Knq4Tj4g3MlfUreEoZDXVOmSMdxjim6Y= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 BB71ECC309 for ; Thu, 21 Jan 2021 15:52:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BB71ECC309 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1l2ZRX-0000oG-Lw; Thu, 21 Jan 2021 15:52:08 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <4c2cde7b-d6c1-2412-a067-361cd722d8c9@tarantool.org> Message-ID: <2c6007cd-83be-332e-4dfc-b39a224ad42f@tarantool.org> Date: Thu, 21 Jan 2021 15:52:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <4c2cde7b-d6c1-2412-a067-361cd722d8c9@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9FAB20BF8F07590368A3B0CD810054B7D9DADA0D25F7A2C51182A05F538085040FB7E347762671AC04DA40459EB430EEA56D9CDA066DFE84209DBE2617DDFA048 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AED985C8E545F588EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063720E5706DB08A2EAB8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCEB69F05919F51CB4B51FA4D2F5A797820452E039FE91B2CD389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C091DAD9F922AA71188941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E5E764EB5D94DBD4CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCC45105550EA7A2F275ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE493B89ED3C7A6281781D2D576BCF940C736C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5B80162F88B70837B43D01181334CDDC2CCFE59AD43974FF0D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA758F9E841AEAEC4F2C410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34EC58E35A639A247104D7E1397B2294C0D90AAAB891E3DEB221E4B9B06B41BBF0D5BAFA5D2F7279181D7E09C32AA3244CCEDC02594E5304490B5B86DF7C38B1E3E8FBBEFAE1C4874CFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojYT//mZRaUejgiv90FMAIlA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822384EC3162A24FED5AE838F359059C713DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v7 2/2] test: fix luacheck warnings in test/sql-tap 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" Thanks for review! On 16.01.2021 01:10, Vladislav Shpilevoy wrote: > Hi! Thanks for the patch! > >> diff --git a/test/sql-tap/with2.test.lua b/test/sql-tap/with2.test.lua >> index 456ded363..cdf1d75a2 100755 >> --- a/test/sql-tap/with2.test.lua >> +++ b/test/sql-tap/with2.test.lua >> @@ -386,22 +386,22 @@ genstmt(255), { >> -- Check that adding a WITH clause to an INSERT disables the xfer >> -- optimization. >> >> -local function do_xfer_test(test, test_func, test_name, func, exp, opts) >> - local opts = opts or {} >> +local function do_xfer_test(test_arg, test_func, test_name, func, exp, opts) >> + opts = opts or {} >> local exp_xfer_count = opts.exp_xfer_count >> local before = box.stat.sql().sql_xfer_count >> - test_func(test, test_name, func, exp) >> + test_func(test_arg, test_name, func, exp) >> local after = box.stat.sql().sql_xfer_count >> test:is(after - before, exp_xfer_count, >> test_name .. '-xfer-count') >> end >> >> -test.do_execsql_xfer_test = function(test, test_name, func, exp, opts) >> - do_xfer_test(test, test.do_execsql_test, test_name, func, exp, opts) >> +test.do_execsql_xfer_test = function(test_arg, test_name, func, exp, opts) >> + do_xfer_test(test_arg, test_arg.do_execsql_test, test_name, func, exp, opts) >> end >> >> -test.do_catchsql_xfer_test = function(test, test_name, func, exp, opts) >> - do_xfer_test(test, test.do_catchsql_test, test_name, func, exp, opts) >> +test.do_catchsql_xfer_test = function(test_arg, test_name, func, exp, opts) >> + do_xfer_test(test_arg, test_arg.do_catchsql_test, test_name, func, exp, opts) >> end >> >> test:do_execsql_test( > I reverted this entire diff hunk and luacheck passed. > Indeed, in this hunk you only fix upvalue redefinitions, > which we have agreed to leave as is, and you even added > ignores to .luacheckrc to the list of global ignores: > > -- Redefining a local variable. > "411", > -- Redefining an argument. > "412", > -- Shadowing a local variable. > "421", > -- Shadowing an upvalue. > "431", > -- Shadowing an upvalue argument. > "432", > > Why did you change this file? > Also I did this and the check also has passed: > > diff --git a/test/sql-tap/analyze9.test.lua b/test/sql-tap/analyze9.test.lua > index 50300cdbe..b8955531a 100755 > --- a/test/sql-tap/analyze9.test.lua > +++ b/test/sql-tap/analyze9.test.lua > @@ -244,7 +244,7 @@ test:do_execsql_test( > local function insert_filler_rows_n(iStart, nCopy, nVal) > for i = 0, nVal-1 do > local iVal = iStart+i > - for _ = 0, nCopy-1 do > + for j = 0, nCopy-1 do > box.execute(string.format("INSERT INTO t1 VALUES (null, %s, %s, '%s')", iVal, iVal, iVal)) > end > end > > I reverted one of your first changes in this commit. > The check passes because it looks like you left a ton of > ignores in files["test/sql-tap/**/*.lua"] in .luacheckrc. > > These comments make me think that you checked the files > without using .luacheckrc config or I don't know. > > I suggest you to re-make the patch with these ignores > and excess diff removed. sent updated series [1]. 1. https://lists.tarantool.org/tarantool-patches/cover.1611232655.git.sergeyb@tarantool.org/T/#t