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 50C641285B21; Fri, 14 Feb 2025 09:49:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 50C641285B21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1739515782; bh=ccxn5Qcpvr3MIYVcBLSeLmjvEL0+dgCjVAM3W4Yq9oo=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=tqak6jPcbzGOwuqA3k1nSAFqBEzU7UmzEHYoSyWHJYSALFbO5W0E3MOTd+vbWaLDV +VNhkWlHujCHGzTi5JcJjrQxLuEptODfeKNOXLZTDAhAM3buUmBncm/wGKw6+TX29B 8pbflj+jh77Va9TyRAUF2Je6TVnIVQVnPzu+ET5U= Received: from send35.i.mail.ru (send35.i.mail.ru [89.221.237.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4E4FD38A029 for ; Fri, 14 Feb 2025 09:49:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4E4FD38A029 Received: by exim-smtp-844687bc8-brn82 with esmtpa (envelope-from ) id 1tipW7-000000001e0-0tAO; Fri, 14 Feb 2025 09:49:39 +0300 Content-Type: multipart/alternative; boundary="------------Zn0tMgGZkkrgwIDH2mZjd2Ef" Message-ID: <18776d28-113c-44ac-8c8a-b1966f4ea2f5@tarantool.org> Date: Fri, 14 Feb 2025 09:49:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Kaplun , Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org References: <9f6e14af248c0514c0c3f813e216676457a177be.1739362574.git.sergeyb@tarantool.org> Content-Language: en-US In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD93899CACFFF273C592410AF6BC9A94DB4F79A225EC2EDD32B182A05F538085040B5C46E9EE69F3AD23DE06ABAFEAF67056128F28EE8D92146676C72E40420BAA5036170912EE13762 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76DD23B0452F84E3CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063707C1E244DAE02CF68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87B375275BA70B1A6E55597BE4366DB79B4DE353AEEF1453DCC7F00164DA146DAFE8445B8C89999728AA50765F790063793270F7220657A0A389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8744B801E316CB65FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C2D01283D1ACF37BA302FCEF25BFAB3454AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C31DD302B0B79430F8BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE75B51C8FB0C3E748C731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5FB7956850D12631A5002B1117B3ED696F8C155F91C536804E20DC3F561CE4150823CB91A9FED034534781492E4B8EEADA91A6E18C88C5E2F X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF250565CBB19728898F9064F5533521680CD16DD5C006DCBF1487AF1BD023826D14755E582FAB3B35856F99080E561BE1794281C4BBFA7A8AE9C0646296EF689F68292495F97BAB3A5F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JLyxlCMHyJC27TEfSK/c0LpFG4aqj46bJA== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140CFEC37694CBADBCA9487ABAC94A94B548D01864270B271210152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit][v2] test: limit code and comment max length 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------Zn0tMgGZkkrgwIDH2mZjd2Ef Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Sergey! Updated and force-pushed. Sergey On 13.02.2025 16:50, Sergey Kaplun via Tarantool-patches wrote: > Hi, Sergey! > Thanks for the decent work! > I've checked, at a rough guess, that there are no line numbers to be > updated in these changed files. > LGTM, with an ignorable suggestion below. > > On 12.02.25, Sergey Bronnikov wrote: >> The patch sets a max length with 80 symbols for lines with code >> and max length with 66 symbols for lines with comments in luacheck >> configuration file [1] and fixes files where this length is >> exceeding. >> >> 1.https://luacheck.readthedocs.io/en/stable/warnings.html#line-length-limits >> --- >> Changes v2: >> - Added fixes according to comments by Sergey Kaplun. >> - Reduced a max length of lines with comments (80 -> 66). >> - Fixed warnings triggered by reducing max limit of lines with >> comments. >> >> Branch:https://github.com/tarantool/luajit/tree/ligurio/gh-xxxx-set-max-length >> >> .luacheckrc | 3 + >> .../fix-argv-handling.test.lua | 4 ++ >> .../fix-binary-number-parsing.test.lua | 2 + >> .../gh-3196-incorrect-string-length.test.lua | 3 + >> ...gh-4773-tonumber-fail-on-NUL-char.test.lua | 9 +-- >> test/tarantool-tests/gh-6163-min-max.test.lua | 68 ++++++++++++------- >> .../gh-7745-oom-on-trace.test.lua | 3 +- >> .../lj-1004-oom-error-frame.test.lua | 6 +- >> .../lj-1116-redzones-checks.test.lua | 2 + >> .../lj-1149-g-number-formating-bufov.test.lua | 4 +- >> .../lj-366-strtab-correct-size.test.lua | 17 +++-- >> .../lj-416-xor-before-jcc.test.lua | 28 ++++---- >> .../lj-494-table-chain-infinite-loop.test.lua | 14 ++-- >> ...lj-505-fold-no-strref-for-ptrdiff.test.lua | 3 +- >> .../lj-524-fold-conv-respect-src-irt.test.lua | 4 +- >> .../lj-603-err-snap-restore.test.lua | 6 +- >> ...-611-gc64-inherit-frame-slot-orig.test.lua | 2 + >> .../lj-611-gc64-inherit-frame-slot.test.lua | 2 + >> .../lj-624-jloop-snapshot-pc.test.lua | 4 +- >> .../lj-688-snap-ir-rename.test.lua | 2 + >> .../lj-737-snap-use-def-upvalues.test.lua | 3 +- >> .../lj-819-fix-missing-uclo.test.lua | 49 +++++++------ >> ...-865-cross-generation-mach-o-file.test.lua | 4 ++ >> ...lj-918-fma-numerical-accuracy-jit.test.lua | 4 ++ >> .../lj-918-fma-numerical-accuracy.test.lua | 4 ++ >> .../lj-962-stack-overflow-report.test.lua | 3 +- >> .../lj-962-stack-overflow-report/script.lua | 3 +- >> .../mark-conv-non-weak.test.lua | 2 + >> .../misclib-getmetrics-lapi.test.lua | 9 ++- >> .../or-144-gc64-asmref-l.test.lua | 4 ++ >> .../or-232-unsink-64-kptr.test.lua | 24 ++++--- >> .../profilers/gh-5688-tool-cli-flag.test.lua | 3 +- >> .../gh-5813-resolving-of-c-symbols.test.lua | 9 +-- >> .../gh-5994-memprof-human-readable.test.lua | 3 +- >> ...17-profile-parsers-error-handling.test.lua | 3 +- >> tools/sysprof/parse.lua | 6 +- >> 36 files changed, 206 insertions(+), 113 deletions(-) > > >> diff --git a/test/tarantool-tests/mark-conv-non-weak.test.lua b/test/tarantool-tests/mark-conv-non-weak.test.lua >> index 73c24b66..fe0969cf 100644 >> --- a/test/tarantool-tests/mark-conv-non-weak.test.lua >> +++ b/test/tarantool-tests/mark-conv-non-weak.test.lua >> @@ -4,6 +4,7 @@ local test = tap.test('mark-conv-non-weak'):skipcond({ >> }) >> >> test:plan(1) >> +-- luacheck: push no max_comment_line_length > I suggest the following patch instead to prevent the warning only for > necessary part of the IR dump: > > =================================================================== > diff --git a/test/tarantool-tests/mark-conv-non-weak.test.lua b/test/tarantool-tests/mark-conv-non-weak.test.lua > index 73c24b66..4396ee58 100644 > --- a/test/tarantool-tests/mark-conv-non-weak.test.lua > +++ b/test/tarantool-tests/mark-conv-non-weak.test.lua > @@ -9,20 +9,22 @@ test:plan(1) > -- instruction is emitted. See `loop_unrool` in `lj_opt_loop.c`. > local data = {0, 0.1, 0, 0 / 0} > > ---- XXX: The sum is required to be initialized with a non-zero > --- floating point value; otherwise, `0023  + num ADD    0017  0007` > --- instruction in the IR below becomes `ADDOV` and the `CONV int.num` > --- conversion is used by it. > +-- XXX: The sum is required to be initialized with a non-zero > +-- floating point value. > +-- Otherwise, `0023  + num ADD    0017  0007` instruction in the > +-- IR below becomes `ADDOV` and the `CONV int.num` conversion is > +-- used by it. > local sum = 0.1 > > jit.opt.start('hotloop=1') > > --- XXX: The test fails before the patch only > --- for `DUALNUM` mode. All of the IRs below are > --- produced by the corresponding LuaJIT build. > +-- XXX: The test fails before the patch only for `DUALNUM` mode. > +-- All of the IRs below are produced by the corresponding LuaJIT > +-- build. > > --- When the trace is recorded, the IR > --- is the following before the patch: > +-- luacheck: push no max_comment_line_length > +-- When the trace is recorded, the IR is the following before the > +-- patch: > ---- TRACE 1 IR > -- .... SNAP #0 [ ---- ---- ---- ---- ---- ---- ---- ---- ---- ] > -- 0001 u8 XLOAD [0x100dac521] V > @@ -104,6 +106,8 @@ jit.opt.start('hotloop=1') > ---- TRACE 1 exit 0 > ---- TRACE 1 exit 2 > -- > +-- luacheck: pop > +-- > -- Before the patch, the `0022 > int CONV 0017 int.num` > -- instruction is omitted due to DCE, which results in the > -- third side exit being taken, instead of the second, > =================================================================== > > Thoughts? I've no objections, applied. > >> -- XXX: These values were chosen to create type instability >> -- in the loop-carried dependency, so the checked `CONV int.num` >> -- instruction is emitted. See `loop_unrool` in `lj_opt_loop.c`. >> @@ -114,6 +115,7 @@ jit.opt.start('hotloop=1') >> -- >> -- Note that DCE happens on the assembly part of the trace >> -- compilation. That is why `CONV` is present in both IRs. >> +-- luacheck: pop >> >> for _, val in ipairs(data) do >> if val == val then > > --------------Zn0tMgGZkkrgwIDH2mZjd2Ef Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi, Sergey!

Updated and force-pushed.

Sergey


On 13.02.2025 16:50, Sergey Kaplun via Tarantool-patches wrote:
Hi, Sergey!
Thanks for the decent work!
I've checked, at a rough guess, that there are no line numbers to be
updated in these changed files.
LGTM, with an ignorable suggestion below.

On 12.02.25, Sergey Bronnikov wrote:
The patch sets a max length with 80 symbols for lines with code
and max length with 66 symbols for lines with comments in luacheck
configuration file [1] and fixes files where this length is
exceeding.

1. https://luacheck.readthedocs.io/en/stable/warnings.html#line-length-limits
---
Changes v2:
- Added fixes according to comments by Sergey Kaplun.
- Reduced a max length of lines with comments (80 -> 66).
- Fixed warnings triggered by reducing max limit of lines with
  comments.

Branch: https://github.com/tarantool/luajit/tree/ligurio/gh-xxxx-set-max-length

 .luacheckrc                                   |  3 +
 .../fix-argv-handling.test.lua                |  4 ++
 .../fix-binary-number-parsing.test.lua        |  2 +
 .../gh-3196-incorrect-string-length.test.lua  |  3 +
 ...gh-4773-tonumber-fail-on-NUL-char.test.lua |  9 +--
 test/tarantool-tests/gh-6163-min-max.test.lua | 68 ++++++++++++-------
 .../gh-7745-oom-on-trace.test.lua             |  3 +-
 .../lj-1004-oom-error-frame.test.lua          |  6 +-
 .../lj-1116-redzones-checks.test.lua          |  2 +
 .../lj-1149-g-number-formating-bufov.test.lua |  4 +-
 .../lj-366-strtab-correct-size.test.lua       | 17 +++--
 .../lj-416-xor-before-jcc.test.lua            | 28 ++++----
 .../lj-494-table-chain-infinite-loop.test.lua | 14 ++--
 ...lj-505-fold-no-strref-for-ptrdiff.test.lua |  3 +-
 .../lj-524-fold-conv-respect-src-irt.test.lua |  4 +-
 .../lj-603-err-snap-restore.test.lua          |  6 +-
 ...-611-gc64-inherit-frame-slot-orig.test.lua |  2 +
 .../lj-611-gc64-inherit-frame-slot.test.lua   |  2 +
 .../lj-624-jloop-snapshot-pc.test.lua         |  4 +-
 .../lj-688-snap-ir-rename.test.lua            |  2 +
 .../lj-737-snap-use-def-upvalues.test.lua     |  3 +-
 .../lj-819-fix-missing-uclo.test.lua          | 49 +++++++------
 ...-865-cross-generation-mach-o-file.test.lua |  4 ++
 ...lj-918-fma-numerical-accuracy-jit.test.lua |  4 ++
 .../lj-918-fma-numerical-accuracy.test.lua    |  4 ++
 .../lj-962-stack-overflow-report.test.lua     |  3 +-
 .../lj-962-stack-overflow-report/script.lua   |  3 +-
 .../mark-conv-non-weak.test.lua               |  2 +
 .../misclib-getmetrics-lapi.test.lua          |  9 ++-
 .../or-144-gc64-asmref-l.test.lua             |  4 ++
 .../or-232-unsink-64-kptr.test.lua            | 24 ++++---
 .../profilers/gh-5688-tool-cli-flag.test.lua  |  3 +-
 .../gh-5813-resolving-of-c-symbols.test.lua   |  9 +--
 .../gh-5994-memprof-human-readable.test.lua   |  3 +-
 ...17-profile-parsers-error-handling.test.lua |  3 +-
 tools/sysprof/parse.lua                       |  6 +-
 36 files changed, 206 insertions(+), 113 deletions(-)
<snipped>

diff --git a/test/tarantool-tests/mark-conv-non-weak.test.lua b/test/tarantool-tests/mark-conv-non-weak.test.lua
index 73c24b66..fe0969cf 100644
--- a/test/tarantool-tests/mark-conv-non-weak.test.lua
+++ b/test/tarantool-tests/mark-conv-non-weak.test.lua
@@ -4,6 +4,7 @@ local test = tap.test('mark-conv-non-weak'):skipcond({
 })
 
 test:plan(1)
+-- luacheck: push no max_comment_line_length
I suggest the following patch instead to prevent the warning only for
necessary part of the IR dump:

===================================================================
diff --git a/test/tarantool-tests/mark-conv-non-weak.test.lua b/test/tarantool-tests/mark-conv-non-weak.test.lua
index 73c24b66..4396ee58 100644
--- a/test/tarantool-tests/mark-conv-non-weak.test.lua
+++ b/test/tarantool-tests/mark-conv-non-weak.test.lua
@@ -9,20 +9,22 @@ test:plan(1)
 -- instruction is emitted. See `loop_unrool` in `lj_opt_loop.c`.
 local data = {0, 0.1, 0, 0 / 0}
 
---- XXX: The sum is required to be initialized with a non-zero
--- floating point value; otherwise, `0023  + num ADD    0017  0007`
--- instruction in the IR below becomes `ADDOV` and the `CONV int.num`
--- conversion is used by it.
+-- XXX: The sum is required to be initialized with a non-zero
+-- floating point value.
+-- Otherwise, `0023  + num ADD    0017  0007` instruction in the
+-- IR below becomes `ADDOV` and the `CONV int.num` conversion is
+-- used by it.
 local sum = 0.1
 
 jit.opt.start('hotloop=1')
 
--- XXX: The test fails before the patch only
--- for `DUALNUM` mode. All of the IRs below are
--- produced by the corresponding LuaJIT build.
+-- XXX: The test fails before the patch only for `DUALNUM` mode.
+-- All of the IRs below are produced by the corresponding LuaJIT
+-- build.
 
--- When the trace is recorded, the IR
--- is the following before the patch:
+-- luacheck: push no max_comment_line_length
+-- When the trace is recorded, the IR is the following before the
+-- patch:
 ---- TRACE 1 IR
 -- ....        SNAP   #0   [ ---- ---- ---- ---- ---- ---- ---- ---- ---- ]
 -- 0001    u8  XLOAD  [0x100dac521]  V
@@ -104,6 +106,8 @@ jit.opt.start('hotloop=1')
 ---- TRACE 1 exit 0
 ---- TRACE 1 exit 2
 --
+-- luacheck: pop
+--
 -- Before the patch, the `0022 >  int CONV   0017  int.num`
 -- instruction is omitted due to DCE, which results in the
 -- third side exit being taken, instead of the second,
===================================================================

Thoughts?

I've no objections, applied.



 -- XXX: These values were chosen to create type instability
 -- in the loop-carried dependency, so the checked `CONV int.num`
 -- instruction is emitted. See `loop_unrool` in `lj_opt_loop.c`.
@@ -114,6 +115,7 @@ jit.opt.start('hotloop=1')
 --
 -- Note that DCE happens on the assembly part of the trace
 -- compilation. That is why `CONV` is present in both IRs.
+-- luacheck: pop
 
 for _, val in ipairs(data) do
     if val == val then
<snipped>

--------------Zn0tMgGZkkrgwIDH2mZjd2Ef--