From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: Sergey Bronnikov <estetus@gmail.com>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit][v2] Always close profiler output file.
Date: Wed, 5 Mar 2025 18:09:53 +0300 [thread overview]
Message-ID: <a20d7150-68ea-488e-aad9-f4ede54c0382@tarantool.org> (raw)
In-Reply-To: <Z8hmnD6_Jm65zxjZ@root>
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
On 05.03.2025 17:58, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for adding the testcases!
> LGTM with a last comment below.
>
>> +
>> +local function close_profile_dump_with_0_samples_with_unload(subtest)
>> + local jit_p = require('jit.p')
>> +
>> +subtest:plan(1)
>> +
>> + collectgarbage('stop')
>> + jit_p.start(jit_p_options, filename)
>> + jit_p.stop()
>> +
>> + -- Unload the module and clean the local.
>> + package.loaded['jit.p'] = nil
>> + jit_p = nil -- luacheck: no unused
>> + collectgarbage('collect')
>> +
>> + local f = io.open(filename, 'r')
>> + local p_content =f:read('a*')
>> +subtest:is(p_content, '[No samples collected]\n',
>> + 'profile dump has no samples')
>> + f.close()
> Typo: s/f./f:/
Thanks!
---
a/test/tarantool-tests/lj-1304-close-profile-dump-with-0-samples.test.lua
+++
b/test/tarantool-tests/lj-1304-close-profile-dump-with-0-samples.test.lua
@@ -51,7 +51,7 @@ local function
close_profile_dump_with_0_samples_with_unload(subtest)
local p_content = f:read('a*')
subtest:is(p_content, '[No samples collected]\n',
'profile dump has no samples')
- f.close()
+ f:close()
-- Teardown.
collectgarbage('restart')
[-- Attachment #2: Type: text/html, Size: 2431 bytes --]
next prev parent reply other threads:[~2025-03-05 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 12:20 Sergey Bronnikov via Tarantool-patches
2025-02-13 15:31 ` Sergey Kaplun via Tarantool-patches
2025-02-25 8:58 ` Sergey Bronnikov via Tarantool-patches
2025-02-26 11:58 ` Sergey Kaplun via Tarantool-patches
2025-02-27 13:07 ` Sergey Bronnikov via Tarantool-patches
2025-03-04 15:40 ` Sergey Kaplun via Tarantool-patches
2025-03-05 14:13 ` Sergey Bronnikov via Tarantool-patches
2025-03-05 14:58 ` Sergey Kaplun via Tarantool-patches
2025-03-05 15:09 ` Sergey Bronnikov via Tarantool-patches [this message]
2025-03-12 11:12 ` Sergey Kaplun 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=a20d7150-68ea-488e-aad9-f4ede54c0382@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=estetus@gmail.com \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit][v2] Always close profiler output file.' \
/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