<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 05.03.2025 17:58, Sergey Kaplun
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:Z8hmnD6_Jm65zxjZ@root">
      <pre wrap="" class="moz-quote-pre">Hi, Sergey!
Thanks for adding the testcases!
LGTM with a last comment below.

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">+
+local function close_profile_dump_with_0_samples_with_unload(subtest)
+  local jit_p = require('jit.p')
+
+  <a class="moz-txt-link-freetext" href="subtest:plan(1)">subtest:plan(1)</a>
+
+  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 = <a class="moz-txt-link-freetext" href="f:read('a*')">f:read('a*')</a>
+  <a class="moz-txt-link-freetext" href="subtest:is(p_content">subtest:is(p_content</a>, '[No samples collected]\n',
+             'profile dump has no samples')
+  f.close()
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Typo: s/f./<a class="moz-txt-link-freetext" href="f:/">f:/</a>
</pre>
    </blockquote>
    <p>Thanks!</p>
    <p><br>
    </p>
    <p>---
a/test/tarantool-tests/lj-1304-close-profile-dump-with-0-samples.test.lua<br>
      +++
b/test/tarantool-tests/lj-1304-close-profile-dump-with-0-samples.test.lua<br>
      @@ -51,7 +51,7 @@ local function
      close_profile_dump_with_0_samples_with_unload(subtest)<br>
         local p_content = <a class="moz-txt-link-freetext" href="f:read('a*')">f:read('a*')</a><br>
         <a class="moz-txt-link-freetext" href="subtest:is(p_content">subtest:is(p_content</a>, '[No samples collected]\n',<br>
                    'profile dump has no samples')<br>
      -  f.close()<br>
      +  <a class="moz-txt-link-freetext" href="f:close()">f:close()</a><br>
       <br>
         -- Teardown.<br>
         collectgarbage('restart')<br>
    </p>
    <blockquote type="cite" cite="mid:Z8hmnD6_Jm65zxjZ@root">
      <pre wrap="" class="moz-quote-pre">
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>