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 4E1B771223; Wed, 27 Oct 2021 18:08:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4E1B771223 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1635347339; bh=bdcHnciWHh7yWOq9fbjFHmdecGbFEO1dvt2cLGtNKn0=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=p4gnj85EKzDKrXBXRGRJXxmJnGooeHMZEHN+pDdm4cDgS7wRC12tUab5gqCj3rXNS iu7Hjiyl/1ztkzqAa/rPM8N724mKHisdq6dGtHMWj4DIrc/mqP/LwF9eyb1u0aJrxt lLmIb5hMIYOOkSs6r/ukijgDIYd6r6/20PscrnTU= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 3F3A071223 for ; Wed, 27 Oct 2021 18:08:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3F3A071223 Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1mfkXx-0004ru-Ez; Wed, 27 Oct 2021 18:08:57 +0300 Date: Wed, 27 Oct 2021 18:07:12 +0300 To: Mikhail Shishatskiy Message-ID: References: <20210929200758.149446-1-m.shishatskiy@tarantool.org> <20210929200758.149446-2-m.shishatskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210929200758.149446-2-m.shishatskiy@tarantool.org> X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D1D35DBD2D15487E109F535F427989191BFAC4E9BCE66C72182A05F538085040F7D8594FB8AF263D3D54B72B5437FA443400636A9C82C7023F2345F1F0CC9C1A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7466896EF24E80F12EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379448E89E2A57838D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8DE46C284DB544D8D166E5C501D88AD19117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B658CDF7FFE3EBBCC0089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505BE30B92918A050E8C3A76BF843CD19CC X-C1DE0DAB: 0D63561A33F958A56E7BC33C1A4156F2201D724A81BEC34622B88EFF18F26735D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7567C209D01CC1E34B410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AC632F0BE69382F3807F98797407C1798FE1EB7348B3B6100A31081FECC8C6E2B15E6E7BCAE78BD01D7E09C32AA3244C72C2BEC73420CAA5F1CAD0DEAAD30ECB8580396430872480FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojOHwMx23X6B1TXpUCJ99hsg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB45108248F55654866C8818DD627414B10933167630E846540F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v4 1/4] test: separate memprof Lua API tests into subtests 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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( > +-- 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") > > -- > 2.33.0 > -- Best regards, Sergey Kaplun