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 A01A56EC5A; Sat, 27 Feb 2021 02:43:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A01A56EC5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614383002; bh=TtckevLSXC4RCroxhfD+PdW0Er/xzrAEl+8OsYlA8bM=; 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=e6sCVlz7ZQdyBRsR0UwoKAqVNkWX1UXgqByS/rQVaWJU938hXGkCphNZj2sJfrLBF S1Bld9eFyFcX8HqEMF6u47fYg4t0Bhf/xmuGJnzTdMBO1SMLzZ9OU8sL1K7NgRyOV+ IfKaw+7gRY9hKJZHshIhLkIGGBKTH3DiismZ+CRI= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [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 509736EC6F for ; Sat, 27 Feb 2021 02:42:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 509736EC6F Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lFml3-0000le-Nz; Sat, 27 Feb 2021 02:42:54 +0300 To: Sergey Bronnikov , tarantool-patches@dev.tarantool.org References: <68a02630-efac-0e6c-d6ab-0af18d0192c1@tarantool.org> Message-ID: Date: Sat, 27 Feb 2021 00:42:53 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9795828B892398B72AC588525E45B8D9948334200C4E13096182A05F5380850409941E8A7DF632F756F1539E8DFA0A5D2F422B3444DA6799933B0206E610B943B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BF6699A3AA9BACA6EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF20B9B7F5DD35A68638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC8B45042B6CC5FC9B57988AD75A20CFD87070C3697145CE79389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0ECC8AC47CD0EDEFF8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B69EAAB76869E07C3ECC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC08F9A42B2210255C75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7355E1C53F199C2BB95B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB985633C00BAEBE4F574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A56F11938341FEF4B9929657F41276AD065B7A5D84A3E2892CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34753B45383CEFF2046417B359CEE166ACC739B9B26F1CB545291B4F7D5F32084A1FD5D1E12EF8518C1D7E09C32AA3244C5F56FECF4EB7A1AC4CBB8A024D0EC8718580396430872480729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj8mqzvzJVEn2uaw8056bm6g== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822BC9C3708524AA080035E64A3C56D5A723841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the fixes! >>> diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua >>> index 9cd517673..5dab23007 100755 >>> --- a/test/sql-tap/func.test.lua >>> +++ b/test/sql-tap/func.test.lua >>> @@ -1382,7 +1380,6 @@ test:do_execsql_test( >>>       }) >>>     db("cache", "flush") >>> -V = "three" >> 2. 'V' is supposed to be a variable. It is used in the queries >> in the surrounding code. Please, don't delete parts of the tests. >> It will not make it simpler to restore the context later. The tests >> in this patchset either must be deleted, or resurrected, or hacked >> to keep their context and not fail luacheck. What to choose - depends >> on individual tests. Here clearly we need to keep 'V'. Try to make >> another pass of self-review to locate more of such test-"breaking" >> changes. > > reverted and suppressed > > --- a/test/sql-tap/func.test.lua > +++ b/test/sql-tap/func.test.lua > @@ -1382,6 +1382,7 @@ test:do_execsql_test( >      }) > >  db("cache", "flush") > +local V = "three" -- luacheck: no unused >  test:do_execsql_test( >      "13.8.6", >      [[ Now take a look at the diff in this file: ==================== @@ -1361,7 +1361,6 @@ test:do_execsql_test( -- }) -local V = "one" test:do_execsql_test( "13.8.4", [[ @@ -1372,7 +1371,6 @@ test:do_execsql_test( -- }) -V = "two" test:do_execsql_test( "13.8.5", [[ @@ -1384,7 +1382,7 @@ test:do_execsql_test( }) db("cache", "flush") -V = "three" +local V = "three" -- luacheck: no unused ==================== The comment wasn't about only "three". You shouldn't delete "two" and "one", obviously. By the same reason. They are "used" in these not working tests. > diff --git a/test/sql-tap/select9.test.lua b/test/sql-tap/select9.test.lua > index 4f7da84e2..045d0e4c8 100755 > --- a/test/sql-tap/select9.test.lua > +++ b/test/sql-tap/select9.test.lua > @@ -274,10 +274,8 @@ test:do_execsql_test( > -- > }) > > -local t1_space_id = "" > -local t2_space_id = "" > -t1_space_id = test:execsql([[SELECT * from "_space" where "name"='T1']])["id"] > -t2_space_id = test:execsql([[SELECT * from "_space" where "name"='T2']])["id"] > +local _ = test:execsql([[SELECT * from "_space" where "name"='T1']])["id"] > +local _ = test:execsql([[SELECT * from "_space" where "name"='T2']])["id"] > --X(276, "X!cmd", [=[["db","eval","SELECT * from _space where name='t2'","data","\n set t2_space_id $data(id)\n"]]=]) > --local function reverse(lhs, rhs) > -- return X(283, "X!cmd", [=[["string","compare",["rhs"],["lhs"]]]=]) t2_space_id is used in the commented code. But it looks already corrupted, I can't even closely understand what is happening here. t2_space_id and t1_space_id are obvious names anyway, so we probably could just delete their declaration and assignment but keep t2_space_id usage in the commented code. Or comment them out too.