From: Sergey Bronnikov <sergeyb@tarantool.org> To: Igor Munkin <imun@tarantool.org> Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, alexander.turenko@tarantool.org Subject: Re: [Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap Date: Thu, 16 Jul 2020 14:44:59 +0300 [thread overview] Message-ID: <20200716114459.GA8696@pony.bronevichok.ru> (raw) In-Reply-To: <20200601114101.GR21558@tarantool.org> Igor, thanks for review. On 14:41 Mon 01 Jun , Igor Munkin wrote: > Sergey, > > Thanks, the patch LGTM, except the couple of comments below. > > On 29.05.20, sergeyb@tarantool.org wrote: > > From: Sergey Bronnikov <sergeyb@tarantool.org> > > > > Part of #4681 > > > > Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> > > Reviewed-by: Igor Munkin <imun@tarantool.org> > > > > Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> > > Co-authored-by: Igor Munkin <imun@tarantool.org> > > --- > > .luacheckrc | 3 +- > > test/app-tap/cfg.test.lua | 2 +- > > test/app-tap/clock.test.lua | 4 +- > > test/app-tap/console.test.lua | 16 +- > > test/app-tap/console_lua.test.lua | 22 +- > > test/app-tap/csv.test.lua | 56 +- > > test/app-tap/debug.test.lua | 10 +- > > test/app-tap/errno.test.lua | 24 +- > > test/app-tap/fail_main.test.lua | 6 +- > > .../gh-4761-json-per-call-options.test.lua | 11 +- > > test/app-tap/http_client.test.lua | 297 +++++------ > > test/app-tap/iconv.test.lua | 6 +- > > test/app-tap/init_script.test.lua | 14 +- > > test/app-tap/inspector.test.lua | 5 +- > > test/app-tap/json.test.lua | 1 - > > test/app-tap/logger.test.lua | 21 +- > > test/app-tap/lua/serializer_test.lua | 44 +- > > test/app-tap/minimal.test.lua | 4 +- > > test/app-tap/module_api.test.lua | 12 +- > > test/app-tap/msgpackffi.test.lua | 3 +- > > test/app-tap/pcall.test.lua | 6 +- > > test/app-tap/popen.test.lua | 35 +- > > test/app-tap/snapshot.test.lua | 17 +- > > test/app-tap/string.test.lua | 502 +++++++++--------- > > test/app-tap/tap.test.lua | 26 +- > > test/app-tap/tarantoolctl.test.lua | 82 ++- > > test/app-tap/trigger.test.lua | 48 +- > > test/app-tap/yaml.test.lua | 16 +- > > 28 files changed, 630 insertions(+), 663 deletions(-) > > > > diff --git a/.luacheckrc b/.luacheckrc > > index 78bb54adb..630834e16 100644 > > --- a/.luacheckrc > > +++ b/.luacheckrc > > @@ -7,7 +7,6 @@ exclude_files = { > > "build/**/*.lua", > > "src/box/lua/serpent.lua", -- third-party source code > > "test/app/*.test.lua", > > - "test/app-tap/lua/serializer_test.lua", > > This occurrence still exists on the branch. removed in a branch [1] 1. ligurio/gh-4681-fix-luacheck-warnings-test > > "test/box/**/*.lua", > > "test/engine/*.lua", > > "test/engine_long/*.lua", > > <snipped> > > > diff --git a/test/app-tap/lua/serializer_test.lua b/test/app-tap/lua/serializer_test.lua > > index 2a668f898..fdbfb3b24 100644 > > --- a/test/app-tap/lua/serializer_test.lua > > +++ b/test/app-tap/lua/serializer_test.lua > > <snipped> > > > @@ -483,21 +473,21 @@ local function test_decode_buffer(test, s) > > test:plan(#cases) > > > > for _, case in ipairs(cases) do > > - test:test(case[1], function(test) > > - test:plan(4) > > + test:test(case[1], function(testcase) > > + testcase:plan(4) > > local args_len = table.maxn(case.args) > > local res, res_buf = case.func(unpack(case.args, 1, args_len)) > > - test:is_deeply(res, case.exp_res, 'verify result') > > + testcase:is_deeply(res, case.exp_res, 'verify result') > > local buf = case.args[1] > > local rewind = res_buf - buf > > - test:is(rewind, case.exp_rewind, 'verify resulting buffer') > > + testcase:is(rewind, case.exp_rewind, 'verify resulting buffer') > > -- test:iscdata() is not sufficient here, because it > > Please, adjust the comment, considering the changes you introduced > around here. adjusted: local rewind = res_buf - buf - test:is(rewind, case.exp_rewind, 'verify resulting buffer') - -- test:iscdata() is not sufficient here, because it + testcase:is(rewind, case.exp_rewind, 'verify resulting buffer') + -- testcase:iscdata() is not sufficient here, because it -- ignores 'const' qualifier (because of using -- ffi.istype()). > > -- ignores 'const' qualifier (because of using > > -- ffi.istype()). > > - test:is(type(res_buf), 'cdata', 'verify resulting buffer type') > > + testcase:is(type(res_buf), 'cdata', 'verify resulting buffer type') > > local buf_ctype = tostring(ffi.typeof(buf)) > > local res_buf_ctype = tostring(ffi.typeof(res_buf)) > > - test:is(res_buf_ctype, buf_ctype, 'verify resulting buffer ctype') > > + testcase:is(res_buf_ctype, buf_ctype, 'verify resulting buffer ctype') > > end) > > end > > end > > <snipped> > > > -- > > 2.23.0 > > > > -- > Best regards, > IM
next prev parent reply other threads:[~2020-07-16 11:45 UTC|newest] Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-29 15:08 [Tarantool-patches] [PATCH v6 00/25] Add static analysis with luacheck sergeyb 2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 01/25] Add initial luacheck config sergeyb 2020-05-29 16:04 ` Igor Munkin 2020-05-29 16:27 ` Igor Munkin 2020-05-30 12:19 ` Sergey Bronnikov 2020-05-30 12:18 ` Sergey Bronnikov 2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 02/25] build: enable 'make luacheck' target sergeyb 2020-05-29 16:28 ` Igor Munkin 2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 03/25] gitlab-ci: enable static analysis with luacheck sergeyb 2020-05-29 19:25 ` Igor Munkin 2020-06-01 9:29 ` Sergey Bronnikov 2020-06-01 9:48 ` Igor Munkin 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 04/25] Fix luacheck warnings in extra/dist/tarantoolctl.in sergeyb 2020-05-29 16:35 ` Igor Munkin 2020-06-01 14:10 ` Alexander Turenko 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 05/25] Fix luacheck warnings in src/lua/ sergeyb 2020-05-29 16:51 ` Igor Munkin 2020-05-29 19:13 ` Igor Munkin 2020-05-30 12:15 ` Sergey Bronnikov 2020-06-01 9:43 ` Igor Munkin 2020-06-01 10:36 ` Sergey Bronnikov 2020-06-01 9:38 ` Sergey Bronnikov 2020-06-01 14:47 ` Alexander Turenko 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 06/25] Fix luacheck warnings in src/box/lua/ sergeyb 2020-05-29 19:11 ` Igor Munkin 2020-05-30 12:22 ` Sergey Bronnikov 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 07/25] Supress luacheck warnings in test/app sergeyb 2020-06-01 10:11 ` Igor Munkin 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap sergeyb 2020-06-01 11:41 ` Igor Munkin 2020-07-16 11:44 ` Sergey Bronnikov [this message] 2020-07-16 12:42 ` Igor Munkin 2020-07-16 13:25 ` Sergey Bronnikov 2020-06-01 13:37 ` Alexander Turenko 2020-06-01 16:37 ` Igor Munkin 2020-06-01 17:13 ` Alexander Turenko 2020-06-01 17:38 ` Igor Munkin 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 09/25] Fix luacheck warnings in test/box sergeyb 2020-06-01 16:06 ` Igor Munkin 2020-07-16 13:23 ` Sergey Bronnikov 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 10/25] Fix luacheck warnings in test/box-py sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 11/25] Fix luacheck warnings in test/box-tap sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 12/25] Fix luacheck warnings in test/engine sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 13/25] Fix luacheck warnings in test/engine_long sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 14/25] Fix luacheck warnings in test/long_run-py sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 15/25] Fix luacheck warnings in test/replication sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 16/25] Fix luacheck warnings in test/replication-py sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 17/25] Fix luacheck warnings in test/sql sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 18/25] Fix luacheck warnings in test/sql-tap sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 19/25] Fix luacheck warnings in test/swim sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 20/25] Fix luacheck warnings in test/vinyl sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 21/25] Fix luacheck warnings in test/wal_off sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 22/25] Fix luacheck warnings in test/xlog sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 23/25] Fix luacheck warnings in test/xlog-py sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 24/25] Add luacheck supressions for luajit tests sergeyb 2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 25/25] luajit: bump new version sergeyb 2020-06-01 17:08 ` [Tarantool-patches] [PATCH v6 00/25] Add static analysis with luacheck Vladislav Shpilevoy 2020-06-01 17:29 ` Alexander Turenko 2020-06-01 18:13 ` Igor Munkin 2020-06-02 14:42 ` Alexander Turenko 2020-06-02 15:58 ` Igor Munkin
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=20200716114459.GA8696@pony.bronevichok.ru \ --to=sergeyb@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=imun@tarantool.org \ --cc=o.piskunov@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap' \ /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