Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL
@ 2024-06-06 14:00 Sergey Bronnikov via Tarantool-patches
  2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2024-06-06 14:00 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, Maxim Kokryashkin

From: Sergey Bronnikov <sergeyb@tarantool.org>

The patch defines _TARANTOOL as a global in luacheck configuration
file and removes inline suppressions in test files.
---
Branch: https://github.com/tarantool/luajit/tree/ligurio/fix-_TARANTOOL

 .luacheckrc                                                     | 2 +-
 test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua   | 1 -
 test/tarantool-tests/gh-5688-tool-cli-flag.test.lua             | 1 -
 test/tarantool-tests/gh-5994-memprof-human-readable.test.lua    | 1 -
 test/tarantool-tests/gh-7745-oom-on-trace.test.lua              | 1 -
 .../gh-9217-profile-parsers-error-handling.test.lua             | 1 -
 .../lj-1108-fix-dangling-reference-to-ctype.test.lua            | 1 -
 test/tarantool-tests/lj-549-bytecode-loader.test.lua            | 1 -
 test/tarantool-tests/lj-551-bytecode-c-broken-macro.test.lua    | 1 -
 test/tarantool-tests/lj-603-err-snap-restore.test.lua           | 1 -
 test/tarantool-tests/lj-802-panic-at-mcode-protfail.test.lua    | 1 -
 .../lj-920-fix-dangling-reference-to-ctype.test.lua             | 1 -
 12 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index a32012ca..62ceeaa2 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -1,7 +1,7 @@
 -- Use the default LuaJIT globals.
 std = 'luajit'
 -- This fork also introduces a new global for misc API namespace.
-read_globals = { 'misc' }
+read_globals = { 'misc', '_TARANTOOL' }
 
 -- These files are inherited from the vanilla LuaJIT or different
 -- test suites and need to be coherent with the upstream.
diff --git a/test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua b/test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua
index 2ced5779..2c9d6999 100644
--- a/test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua
+++ b/test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua
@@ -1,7 +1,6 @@
 local tap = require('tap')
 local ffi = require('ffi')
 local test = tap.test('fix-dangling-reference-to-ctype'):skipcond({
-  -- luacheck: no global
   ['Impossible to predict the value of cts->top'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/gh-5688-tool-cli-flag.test.lua b/test/tarantool-tests/gh-5688-tool-cli-flag.test.lua
index 8ead83b5..dd0fd260 100644
--- a/test/tarantool-tests/gh-5688-tool-cli-flag.test.lua
+++ b/test/tarantool-tests/gh-5688-tool-cli-flag.test.lua
@@ -4,7 +4,6 @@ local test = tap.test('gh-5688-tool-cli-flag'):skipcond({
                                                       jit.arch ~= 'x64',
   ['Profile tools are implemented for Linux only'] = jit.os ~= 'Linux',
   -- XXX: Tarantool integration is required to run this test properly.
-  -- luacheck: no global
   ['No profile tools CLI option integration'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/gh-5994-memprof-human-readable.test.lua b/test/tarantool-tests/gh-5994-memprof-human-readable.test.lua
index e34291be..7c3ff94d 100644
--- a/test/tarantool-tests/gh-5994-memprof-human-readable.test.lua
+++ b/test/tarantool-tests/gh-5994-memprof-human-readable.test.lua
@@ -4,7 +4,6 @@ local test = tap.test('gh-5994-memprof-human-readable'):skipcond({
                                                       jit.arch ~= 'x64',
   ['Profile tools are implemented for Linux only'] = jit.os ~= 'Linux',
   -- XXX: Tarantool integration is required to run this test properly.
-  -- luacheck: no global
   ['No profile tools CLI option integration'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
index 9ac41ac7..fe320251 100644
--- a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
+++ b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
@@ -2,7 +2,6 @@ local tap = require('tap')
 local ffi = require('ffi')
 
 local test = tap.test('OOM on trace'):skipcond({
-  -- luacheck: no global
   ['Broken unwiding in tarantool_panic_handler'] = _TARANTOOL and
                                                    (jit.os == 'OSX'),
   ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',
diff --git a/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua b/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua
index 0b7ee2dd..92f9f59d 100644
--- a/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua
+++ b/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua
@@ -4,7 +4,6 @@ local test = tap.test('gh-9217-profile-parsers-error-handling'):skipcond({
                                                       jit.arch ~= 'x64',
   ['Profile tools are implemented for Linux only'] = jit.os ~= 'Linux',
   -- XXX: Tarantool integration is required to run this test properly.
-  -- luacheck: no global
   ['No profile tools CLI option integration'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua b/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua
index a077344e..e1649aa8 100644
--- a/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua
+++ b/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua
@@ -1,7 +1,6 @@
 local tap = require('tap')
 local ffi = require('ffi')
 local test = tap.test('lj-1108-fix-dangling-reference-to-ctype'):skipcond({
-  -- luacheck: no global
   ['Impossible to predict the value of cts->top'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/lj-549-bytecode-loader.test.lua b/test/tarantool-tests/lj-549-bytecode-loader.test.lua
index 76538b58..55185f26 100644
--- a/test/tarantool-tests/lj-549-bytecode-loader.test.lua
+++ b/test/tarantool-tests/lj-549-bytecode-loader.test.lua
@@ -3,7 +3,6 @@ local test = tap.test('lj-549-bytecode-loader'):skipcond({
   -- XXX: Tarantool doesn't use default LuaJIT loaders, and Lua
   -- bytecode can't be loaded from the shared library. For more
   -- info: https://github.com/tarantool/tarantool/issues/9671.
-  -- luacheck: no global
   ['Test uses exotic type of loaders (see #9671)'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/lj-551-bytecode-c-broken-macro.test.lua b/test/tarantool-tests/lj-551-bytecode-c-broken-macro.test.lua
index 4c4a1b25..2641140e 100644
--- a/test/tarantool-tests/lj-551-bytecode-c-broken-macro.test.lua
+++ b/test/tarantool-tests/lj-551-bytecode-c-broken-macro.test.lua
@@ -3,7 +3,6 @@ local test = tap.test('lj-551-bytecode-c-broken-macro'):skipcond({
   -- XXX: Tarantool doesn't use default LuaJIT loaders, and Lua
   -- bytecode can't be loaded from the shared library. For more
   -- info: https://github.com/tarantool/tarantool/issues/9671.
-  -- luacheck: no global
   ['Test uses exotic type of loaders (see #9671)'] = _TARANTOOL,
 })
 
diff --git a/test/tarantool-tests/lj-603-err-snap-restore.test.lua b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
index f5c8474f..d11d474e 100644
--- a/test/tarantool-tests/lj-603-err-snap-restore.test.lua
+++ b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
@@ -34,7 +34,6 @@ local function do_test()
     ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
     -- XXX: The different amount of stack slots is in-use for
     -- Tarantool at start, so just skip test for it.
-    -- luacheck: no global
     ['Disable test for Tarantool'] = _TARANTOOL,
     ['Stack overflow is now handled differently'] = true,
   })
diff --git a/test/tarantool-tests/lj-802-panic-at-mcode-protfail.test.lua b/test/tarantool-tests/lj-802-panic-at-mcode-protfail.test.lua
index 94f4314f..90ff723c 100644
--- a/test/tarantool-tests/lj-802-panic-at-mcode-protfail.test.lua
+++ b/test/tarantool-tests/lj-802-panic-at-mcode-protfail.test.lua
@@ -7,7 +7,6 @@ local test = tap.test('lj-flush-on-trace'):skipcond({
   -- purpose. However, <mprotect> is widely used in Tarantool
   -- to play with fiber stacks, so overriding <mprotect> is not
   -- suitable to test this feature in Tarantool.
-  -- luacheck: no global
   ['<mprotect> overriding can break Tarantool'] = _TARANTOOL,
   -- XXX: Unfortunately, it's too hard to overload (or even
   -- impossible, who knows, since Cupertino fellows do not
diff --git a/test/tarantool-tests/lj-920-fix-dangling-reference-to-ctype.test.lua b/test/tarantool-tests/lj-920-fix-dangling-reference-to-ctype.test.lua
index 0b8be04f..67ca61bb 100644
--- a/test/tarantool-tests/lj-920-fix-dangling-reference-to-ctype.test.lua
+++ b/test/tarantool-tests/lj-920-fix-dangling-reference-to-ctype.test.lua
@@ -2,7 +2,6 @@ local tap = require('tap')
 local ffi = require('ffi')
 local test = tap.test('lj-920-fix-dangling-reference-to-ctype'):skipcond({
   ['Test requires JIT enabled'] = not jit.status(),
-  -- luacheck: no global
   ['Impossible to predict the value of cts->top'] = _TARANTOOL,
 })
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL
  2024-06-06 14:00 [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL Sergey Bronnikov via Tarantool-patches
@ 2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
  2024-06-11 10:00   ` Sergey Bronnikov via Tarantool-patches
  2024-06-14 11:55 ` Maxim Kokryashkin via Tarantool-patches
  2024-07-09  8:03 ` Sergey Kaplun via Tarantool-patches
  2 siblings, 1 reply; 5+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2024-06-10  9:41 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: tarantool-patches

Hi, Sergey!
Thanks for the patch!
LGTM, after fixing my comment below.

On 06.06.24, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
> 
> The patch defines _TARANTOOL as a global in luacheck configuration
> file and removes inline suppressions in test files.
> ---
> Branch: https://github.com/tarantool/luajit/tree/ligurio/fix-_TARANTOOL
> 

<snipped>

>  12 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/.luacheckrc b/.luacheckrc
> index a32012ca..62ceeaa2 100644
> --- a/.luacheckrc
> +++ b/.luacheckrc
> @@ -1,7 +1,7 @@
>  -- Use the default LuaJIT globals.
>  std = 'luajit'
>  -- This fork also introduces a new global for misc API namespace.
> -read_globals = { 'misc' }
> +read_globals = { 'misc', '_TARANTOOL' }

Can we use it only for <tarantool-tests> directory to avoid it appearing
in the Lua sources inside the repository?

===================================================================
diff --git a/.luacheckrc b/.luacheckrc
index a32012ca..7b5634a5 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -3,6 +3,10 @@ std = 'luajit'
 -- This fork also introduces a new global for misc API namespace.
 read_globals = { 'misc' }
 
+-- The `_TARANTOOL` global is often used for skip condition
+-- checks.
+files['test/tarantool-tests/'] = {read_globals = {'_TARANTOOL'}}
+
 -- These files are inherited from the vanilla LuaJIT or different
 -- test suites and need to be coherent with the upstream.
 exclude_files = {
===================================================================


>  
>  -- These files are inherited from the vanilla LuaJIT or different
>  -- test suites and need to be coherent with the upstream.

<snipped>

> -- 
> 2.34.1
> 

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL
  2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
@ 2024-06-11 10:00   ` Sergey Bronnikov via Tarantool-patches
  0 siblings, 0 replies; 5+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2024-06-11 10:00 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

Sergey,


thanks for comments.

Updated patch force-pushed.


Sergey

On 10.06.2024 12:41, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, after fixing my comment below.
>
> On 06.06.24, Sergey Bronnikov wrote:
>> From: Sergey Bronnikov<sergeyb@tarantool.org>
>>
>> The patch defines _TARANTOOL as a global in luacheck configuration
>> file and removes inline suppressions in test files.
>> ---
>> Branch:https://github.com/tarantool/luajit/tree/ligurio/fix-_TARANTOOL
>>
> <snipped>
>
>>   12 files changed, 1 insertion(+), 12 deletions(-)
>>
>> diff --git a/.luacheckrc b/.luacheckrc
>> index a32012ca..62ceeaa2 100644
>> --- a/.luacheckrc
>> +++ b/.luacheckrc
>> @@ -1,7 +1,7 @@
>>   -- Use the default LuaJIT globals.
>>   std = 'luajit'
>>   -- This fork also introduces a new global for misc API namespace.
>> -read_globals = { 'misc' }
>> +read_globals = { 'misc', '_TARANTOOL' }
> Can we use it only for <tarantool-tests> directory to avoid it appearing
> in the Lua sources inside the repository?

Sure.

I've updated your patch a bit (formatting):


--- a/.luacheckrc
+++ b/.luacheckrc
@@ -3,6 +3,12 @@ std = 'luajit'
  -- This fork also introduces a new global for misc API namespace.
  read_globals = { 'misc', '_TARANTOOL' }

+-- The `_TARANTOOL` global is often used for skip condition
+-- checks in tests.
+files['test/tarantool-tests/'] = {
+  read_globals = {'_TARANTOOL'}
+}
+
  -- These files are inherited from the vanilla LuaJIT or different
  -- test suites and need to be coherent with the upstream.
  exclude_files = {


>
> ===================================================================
> diff --git a/.luacheckrc b/.luacheckrc
> index a32012ca..7b5634a5 100644
> --- a/.luacheckrc
> +++ b/.luacheckrc
> @@ -3,6 +3,10 @@ std = 'luajit'
>   -- This fork also introduces a new global for misc API namespace.
>   read_globals = { 'misc' }
>   
> +-- The `_TARANTOOL` global is often used for skip condition
> +-- checks.
> +files['test/tarantool-tests/'] = {read_globals = {'_TARANTOOL'}}
> +
>   -- These files are inherited from the vanilla LuaJIT or different
>   -- test suites and need to be coherent with the upstream.
>   exclude_files = {
> ===================================================================
>
>
>>   
>>   -- These files are inherited from the vanilla LuaJIT or different
>>   -- test suites and need to be coherent with the upstream.
> <snipped>
>
>> -- 
>> 2.34.1
>>

[-- Attachment #2: Type: text/html, Size: 3946 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL
  2024-06-06 14:00 [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL Sergey Bronnikov via Tarantool-patches
  2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
@ 2024-06-14 11:55 ` Maxim Kokryashkin via Tarantool-patches
  2024-07-09  8:03 ` Sergey Kaplun via Tarantool-patches
  2 siblings, 0 replies; 5+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2024-06-14 11:55 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: tarantool-patches

Hi, Sergey!
Thanks for the patch!
LGTM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL
  2024-06-06 14:00 [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL Sergey Bronnikov via Tarantool-patches
  2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
  2024-06-14 11:55 ` Maxim Kokryashkin via Tarantool-patches
@ 2024-07-09  8:03 ` Sergey Kaplun via Tarantool-patches
  2 siblings, 0 replies; 5+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2024-07-09  8:03 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: tarantool-patches

Sergey,

I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master [1], release/3.1 [2]
and release/2.11 [3].

[1]: https://github.com/tarantool/tarantool/pull/10200
[2]: https://github.com/tarantool/tarantool/pull/10201
[3]: https://github.com/tarantool/tarantool/pull/10202

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-09  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06 14:00 [Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL Sergey Bronnikov via Tarantool-patches
2024-06-10  9:41 ` Sergey Kaplun via Tarantool-patches
2024-06-11 10:00   ` Sergey Bronnikov via Tarantool-patches
2024-06-14 11:55 ` Maxim Kokryashkin via Tarantool-patches
2024-07-09  8:03 ` Sergey Kaplun via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox