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 4ECC670358; Tue, 16 Feb 2021 17:09:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4ECC670358 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1613484567; bh=mLb8KKMqTOdzXDJwiYj8ib6JR+bDlnm3TX6/6Me/EAs=; 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=SNuKlCyVJkpWWtZLduoR5+uBp8o7uqNqUvWWEymajlzVEJ6xxRRnEeS69IUv1dDkQ BW/EhEtbHQAbZqpd3oNOa8xL7TOlVBqerqYNGLZY74xJLwRirYnlHnqqMPYUwpfFPe eebkqYtCzMQ+AXtmxueu2g22BOyWd9p1O+7fbFoA= 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 9B18870358 for ; Tue, 16 Feb 2021 17:09:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9B18870358 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lC12X-0004pB-Fe; Tue, 16 Feb 2021 17:09:21 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <77aeb2c2-7d55-f86d-5874-2300c6c975c3@tarantool.org> Message-ID: Date: Tue, 16 Feb 2021 17:09:21 +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: <77aeb2c2-7d55-f86d-5874-2300c6c975c3@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91883A1EE8D2E9932147046C009FE7103E1819F397FE8CCAE182A05F53808504061406C228927B6E749251B58AA405F678C4650AE8C815BB5A541D338CD02ABA4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E50EC9128971FD6EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063727599E9BE65898D58638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC324537CE3EC318B995CD059F84372DF7288983DE31934DA4389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B636DA1BED736F9328CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC569F1129A2C6445075ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7358734EF69C36C4A4DC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F8DB212830C5B42F72623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A52B753D9C3E5713A652B39570323F087ED117C07AA8A07AF3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34E9B0C12ABED55137FB4386B28B1E3B3138F4801381FAFEF82B85021790670D8415FD83224223D0321D7E09C32AA3244C612B2FBB139C7A8FAD00C578F6FDE825A995755A1445935EFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojiBTwj6noE5dUIECRUlMdLA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382269B76470C45DFEF5211A884699D7A956DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 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" Hi, thanks for review! On 24.01.2021 20:34, Vladislav Shpilevoy wrote: > Thanks for the patch! > > See 2 comments below. > > On 21.01.2021 13:49, sergeyb@tarantool.org wrote: >> From: Sergey Bronnikov >> >> W211 (Unused local variable) >> >> Part of #5464 >> >> test: fix luacheck warnings W111 in test/sql-tap >> --- >> diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua >> index 81b08e223..f29b26175 100755 >> --- a/test/sql-tap/e_expr.test.lua >> +++ b/test/sql-tap/e_expr.test.lua >> @@ -1080,7 +1080,6 @@ if (0>0) then >> local function parameter_test(tn, sql, params, result) >> local stmt = sql_prepare_v2("db", sql, -1) >> for _ in X(0, "X!foreach", [=[["number name",["params"]]]=]) do >> - local nm = sql_bind_parameter_name(stmt, number) > 1. You should not delete the function call. It seems it must have > had an effect on the statement object. Without this call in future it > will be harder to understand what is missing if you delete it. reverted hunk > >> X(480, "X!cmd", [=[["do_test",[["tn"],".name.",["number"]],[["list","set","",["nm"]]],["name"]]]=]) >> sql_bind_int(stmt, number, ((-1) * number)) >> end >> diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua >> index 7d928bea0..b1c4f026b 100755 >> --- a/test/sql-tap/misc1.test.lua >> +++ b/test/sql-tap/misc1.test.lua >> @@ -726,19 +726,8 @@ test:do_execsql_test( >> -- MUST_WORK_TEST collate >> if 0>0 then >> db("collate", "numeric", "numeric_collate") >> - local function numeric_collate(lhs, rhs) >> - if (lhs == rhs) >> - then >> - return 0 >> - end >> - return X(0, "X!expr", [=[["?:",[">",["lhs"],["rhs"]],3,["-",1]]]=]) >> - end > 2. The more I look at these db + X pairs, the more it seems like an > artifact after TCL -> Lua conversion. I think originally it was > supposed that the function after 'db()' should be called, and 'X' > should execute something. Worth investigating how these tests looked > originally. Otherwise we may delete too much and not able to resurrect > the tests in future. Yes, you are right regarding artifacts. Although I would not like an idea to fix sql tests in scope of task with luacheck and just suppress places where we cannot fix right now. > > If these code blocks are important for understanding the test (which I > don't understand now, but anyway), maybe it would better to comment > them out instead of deleing. > > Or delete the entire test cases if we are not going to try to resurrect > them, which is also fine.