[Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL

Sergey Bronnikov estetus at gmail.com
Thu Jun 6 17:00:54 MSK 2024


From: Sergey Bronnikov <sergeyb at 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



More information about the Tarantool-patches mailing list