From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 323274765E0 for ; Mon, 21 Dec 2020 14:00:35 +0300 (MSK) References: <234ebec733eb0931bb0394cee74eca42bfb6af3a.1608127545.git.sergeyb@tarantool.org> <4d0f40dd-3974-54d0-4986-f210774dc984@tarantool.org> From: Sergey Bronnikov Message-ID: <380b691d-7ece-e672-3b4b-e294e799f29b@tarantool.org> Date: Mon, 21 Dec 2020 14:00:34 +0300 MIME-Version: 1.0 In-Reply-To: <4d0f40dd-3974-54d0-4986-f210774dc984@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v7 2/3] luacheck: fix warnings in test/app List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, lvasiliev@tarantool.org Hi! Thanks for review! On 20.12.2020 16:59, Vladislav Shpilevoy wrote: > Thanks for the patch! > >> diff --git a/.luacheckrc b/.luacheckrc >> index ae96576ec..d9093a5eb 100644 >> --- a/.luacheckrc >> +++ b/.luacheckrc >> @@ -109,3 +109,6 @@ files["test/app-tap/lua/require_mod.lua"] = { >> files["test/app-tap/string.test.lua"] = { >> globals = {"utf8"} >> } >> +files["test/app/lua/fiber.lua"] = { >> + globals = {"box_fiber_run_test"} >> +} > fiber.lua is used in one place, where it can be properly fixed > instead of ignored. fiber.lua can 'return box_fiber_run_test' in > the end instead of passing this function as a global variable. Fixed in a branch and force-pushed. --- a/test/app/fiber.result +++ b/test/app/fiber.result @@ -560,11 +560,11 @@ space:drop()  ---  ...  -- box.fiber test (create, resume, yield, status) -dofile("fiber.lua") +f = dofile("fiber.lua")  ---  ...  -- print run fiber's test -box_fiber_run_test() +f()  ---  - - 'A: odd  1'    - 'tester: status(printer) = suspended' --- a/test/app/fiber.test.lua +++ b/test/app/fiber.test.lua @@ -215,9 +215,9 @@ fiber.self():name(old_name)  space:drop()  -- box.fiber test (create, resume, yield, status) -dofile("fiber.lua") +f = dofile("fiber.lua")  -- print run fiber's test -box_fiber_run_test() +f()  -- various...  function testfun() while true do fiber.sleep(10) end end  f = fiber.create(testfun) diff --git a/test/app/lua/fiber.lua b/test/app/lua/fiber.lua index 64977623e..301b0f098 100644 --- a/test/app/lua/fiber.lua +++ b/test/app/lua/fiber.lua @@ -78,3 +78,5 @@ function box_fiber_run_test()      end         return result  end + +return box_fiber_run_test