From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Mikhail Shishatskiy <m.shishatskiy@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit v4 1/4] test: separate memprof Lua API tests into subtests Date: Wed, 27 Oct 2021 18:07:12 +0300 [thread overview] Message-ID: <YXlrIBrri0JYQvF+@root> (raw) In-Reply-To: <20210929200758.149446-2-m.shishatskiy@tarantool.org> Hi, Mikhail! Thanks for the patch! LGTM, except a few nits above. On 29.09.21, Mikhail Shishatskiy wrote: > As the number of memprof test cases is expected to grow, > memprof tests are separated into subtests to encapsulate > test cases and be able to skip some of the subtests. > > Also, output generation and parsing separated into a Typo: s/separated/are separated/ > dedicated function `generate_parsed_output`, which allows > one to run memprof on different payloads, passing payload > funtion as an argument. Typo: s/payload funtion/a payload function/ > > Part of tarantool/tarantool#5814 > --- > > Issue: https://github.com/tarantool/tarantool/issues/5814 > Branch: https://github.com/tarantool/luajit/tree/shishqa/gh-5814-group-allocations-on-trace-by-trace-number > CI: https://github.com/tarantool/tarantool/tree/shishqa/gh-5814-group-allocations-on-trace-by-trace-number > > .../misclib-memprof-lapi.test.lua | 169 ++++++++++-------- > 1 file changed, 94 insertions(+), 75 deletions(-) > > diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua > index 06d96b3b..9de4bd98 100644 > --- a/test/tarantool-tests/misclib-memprof-lapi.test.lua > +++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua > @@ -7,7 +7,7 @@ require("utils").skipcond( <snipped> > +-- Test profiler API. > +test:test("smoke", function(subtest) > + subtest:plan(6) > > -res, err = misc.memprof.stop() > -assert(res, err) > + -- Not a directory. > + local res, err, errno = misc.memprof.start(BAD_PATH) > + subtest:ok(res == nil and err:match("No such file or directory")) > + subtest:ok(type(errno) == "number") > > --- Profiler is not running. > -res, err, errno = misc.memprof.stop() > -test:ok(res == nil and err:match("profiler is not running")) > -test:ok(type(errno) == "number") > + -- Profiler is running. > + res, err = misc.memprof.start(TMP_BINFILE) Nit: This tmp file will be rewritten and removed later by the "output" test. Please leave the corresponding comment. > + assert(res, err) > + res, err, errno = misc.memprof.start(TMP_BINFILE) > + subtest:ok(res == nil and err:match("profiler is running already")) > + subtest:ok(type(errno) == "number") > <snipped> > -- > 2.33.0 > -- Best regards, Sergey Kaplun
next prev parent reply other threads:[~2021-10-27 15:08 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-20 7:05 [Tarantool-patches] [PATCH luajit v3 0/4] memprof: group allocations on traces by trace number Mikhail Shishatskiy via Tarantool-patches 2021-08-20 7:05 ` [Tarantool-patches] [PATCH luajit v3 1/5] core: add const to lj_debug_line proto parameter Mikhail Shishatskiy via Tarantool-patches 2021-09-16 15:29 ` Igor Munkin via Tarantool-patches 2021-08-20 7:05 ` [Tarantool-patches] [PATCH luajit v3 2/5] test: separate memprof Lua API tests into subtests Mikhail Shishatskiy via Tarantool-patches 2021-09-16 15:29 ` Igor Munkin via Tarantool-patches 2021-08-20 7:05 ` [Tarantool-patches] [PATCH luajit v3 3/5] memprof: dump traceno if allocate from trace Mikhail Shishatskiy via Tarantool-patches 2021-09-16 15:32 ` Igor Munkin via Tarantool-patches 2021-09-29 19:21 ` Mikhail Shishatskiy via Tarantool-patches 2021-08-20 7:05 ` [Tarantool-patches] [PATCH luajit v3 4/5] memprof: extend symtab with info about traces Mikhail Shishatskiy via Tarantool-patches 2021-09-16 15:32 ` Igor Munkin via Tarantool-patches 2021-09-29 19:21 ` Mikhail Shishatskiy via Tarantool-patches 2021-08-20 7:05 ` [Tarantool-patches] [PATCH luajit v3 5/5] luajit: change order of modules Mikhail Shishatskiy via Tarantool-patches 2021-09-16 15:32 ` Igor Munkin via Tarantool-patches 2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 0/4] memprof: group allocations on traces by traceno Mikhail Shishatskiy via Tarantool-patches 2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 1/4] test: separate memprof Lua API tests into subtests Mikhail Shishatskiy via Tarantool-patches 2021-10-27 13:56 ` Igor Munkin via Tarantool-patches 2021-10-27 15:07 ` Sergey Kaplun via Tarantool-patches [this message] 2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 2/4] memprof: refactor location parsing Mikhail Shishatskiy via Tarantool-patches 2021-10-27 13:56 ` Igor Munkin via Tarantool-patches [not found] ` <20211104130010.mcvnra6e4yl5moo2@surf.localdomain> 2021-11-10 15:38 ` Igor Munkin via Tarantool-patches 2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 3/4] memprof: group allocations on traces by traceno Mikhail Shishatskiy via Tarantool-patches 2021-10-27 13:56 ` Igor Munkin via Tarantool-patches [not found] ` <20211104130156.f2botlihlfhwd3yh@surf.localdomain> 2021-11-11 15:34 ` Igor Munkin via Tarantool-patches 2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 4/4] memprof: add info about trace start to symtab Mikhail Shishatskiy via Tarantool-patches 2021-11-01 16:31 ` Igor Munkin via Tarantool-patches [not found] ` <20211104130228.x6qcne5xeh544hm7@surf.localdomain> 2021-11-12 13:34 ` Igor Munkin via Tarantool-patches 2021-11-17 8:17 ` Sergey Kaplun via Tarantool-patches 2021-11-22 15:11 ` Mikhail Shishatskiy via Tarantool-patches 2021-11-24 12:42 ` Mikhail Shishatskiy via Tarantool-patches 2021-11-24 16:44 ` Igor Munkin via Tarantool-patches 2022-01-27 23:29 ` [Tarantool-patches] [PATCH luajit v4 0/4] memprof: group allocations on traces by traceno Igor Munkin via Tarantool-patches
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=YXlrIBrri0JYQvF+@root \ --to=tarantool-patches@dev.tarantool.org \ --cc=m.shishatskiy@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v4 1/4] test: separate memprof Lua API tests into subtests' \ /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