From: Sergey Bronnikov <sergeyb@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 2/6] Fix luacheck warnings in test/
Date: Fri, 17 Apr 2020 22:47:49 +0300 [thread overview]
Message-ID: <20200417194749.GD115@pony.bronevichok.ru> (raw)
In-Reply-To: <ab91fb26-cb53-cfa9-e2fc-4d02bcb01cf4@tarantool.org>
Vladislav, thanks for review and patch!
On 01:29 Wed 15 Apr , Vladislav Shpilevoy wrote:
> Thanks for the patch!
>
> Consider more fixes below and on the branch in a separate commit.
> That allowed to remove some warning mutes from the luacheck
> config.
>
> ====================
>
> Review fixes: test/
>
> diff --git a/test/app-tap/console_lua.test.lua b/test/app-tap/console_lua.test.lua
> index 3ed6aad97..d0e290d9c 100755
> --- a/test/app-tap/console_lua.test.lua
> +++ b/test/app-tap/console_lua.test.lua
> @@ -13,7 +13,7 @@ local CONSOLE_SOCKET = 'console-lua.sock'
> --
> -- Set Lua output mode.
> local function set_lua_output(client, opts)
> - local opts = opts or {}
> + opts = opts or {}
> local mode = opts.block and 'lua,block' or 'lua'
> client:write(('\\set output %s\n'):format(mode))
> assert(client:read(EOL), 'true' .. EOL, 'set lua output mode')
> diff --git a/test/app-tap/fail_main.test.lua b/test/app-tap/fail_main.test.lua
> index f8c45bf6f..917577f46 100755
> --- a/test/app-tap/fail_main.test.lua
> +++ b/test/app-tap/fail_main.test.lua
> @@ -16,7 +16,7 @@ function run_script(code)
> script:close()
> local output_file = fio.pathjoin(fio.cwd(), 'out.txt')
> local cmd = [[/bin/sh -c 'cd "%s" && "%s" ./script.lua 0> %s 2> %s']]
> - local code = os.execute(
> + code = os.execute(
> string.format(cmd, dir, tarantool_bin, output_file, output_file)
> )
> fio.rmtree(dir)
> diff --git a/test/app-tap/tarantoolctl.test.lua b/test/app-tap/tarantoolctl.test.lua
> index 4d7059559..3fda53274 100755
> --- a/test/app-tap/tarantoolctl.test.lua
> +++ b/test/app-tap/tarantoolctl.test.lua
> @@ -97,23 +97,14 @@ local function tctl_wait_start(dir, name)
> fiber.sleep(0.01)
> end
> ::again::
> - while true do
> - local stat, nb = pcall(require('net.box').new, path, {
> - wait_connected = true, console = true
> - })
> - if stat == false then
> - fiber.sleep(0.01)
> - goto again
> - else
> - break
> - end
> - local stat, msg = pcall(nb.eval, nb, 'require("fiber").time()')
> - if stat == false then
> - fiber.sleep(0.01)
> - else
> - break
> - end
> + local stat, nb = pcall(require('net.box').new, path, {
> + wait_connected = true, console = true
> + })
> + if stat == false then
> + fiber.sleep(0.01)
> + goto again
> end
> + return
> end
> end
>
--
sergeyb@
next prev parent reply other threads:[~2020-04-17 19:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 7:55 [Tarantool-patches] [PATCH v3 0/6] Add static analysis with luacheck Sergey Bronnikov
2020-04-14 7:56 ` [Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/ Sergey Bronnikov
2020-04-14 23:29 ` Vladislav Shpilevoy
2020-04-15 20:51 ` Igor Munkin
2020-04-15 21:40 ` Vladislav Shpilevoy
2020-04-17 9:07 ` Sergey Bronnikov
2020-04-17 9:09 ` Sergey Bronnikov
2020-04-15 20:51 ` Igor Munkin
2020-04-15 21:46 ` Vladislav Shpilevoy
2020-04-16 13:52 ` Igor Munkin
2020-04-17 9:26 ` Sergey Bronnikov
2020-04-17 12:13 ` Igor Munkin
2020-04-14 7:57 ` [Tarantool-patches] [PATCH 2/6] Fix luacheck warnings in test/ Sergey Bronnikov
2020-04-14 23:29 ` Vladislav Shpilevoy
2020-04-17 12:05 ` Igor Munkin
2020-04-17 19:51 ` Sergey Bronnikov
2020-04-17 19:47 ` Sergey Bronnikov [this message]
2020-04-16 13:43 ` Igor Munkin
2020-04-14 7:57 ` [Tarantool-patches] [PATCH 3/6] Fix luacheck warnings in src/box/lua/ Sergey Bronnikov
2020-04-14 23:30 ` Vladislav Shpilevoy
2020-04-14 7:58 ` [Tarantool-patches] [PATCH 4/6] Fix luacheck warnings in extra/dist/tarantoolctl.in Sergey Bronnikov
2020-04-14 23:30 ` Vladislav Shpilevoy
2020-04-15 15:35 ` Igor Munkin
2020-04-14 8:01 ` [Tarantool-patches] [PATCH 5/6] Add luacheck config Sergey Bronnikov
2020-04-14 23:30 ` Vladislav Shpilevoy
2020-04-14 8:01 ` [Tarantool-patches] [PATCH 6/6] gitlab-ci: enable static analysis with luacheck Sergey Bronnikov
2020-04-14 23:30 ` [Tarantool-patches] [PATCH v3 7/6] schema: fix index promotion to functional index Vladislav Shpilevoy
2020-04-14 23:30 ` [Tarantool-patches] [PATCH v3 8/6] schema: fix internal symbols dangling in _G Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200417194749.GD115@pony.bronevichok.ru \
--to=sergeyb@tarantool.org \
--cc=o.piskunov@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 2/6] Fix luacheck warnings in test/' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox