* [Tarantool-patches] [PATCH luajit] test: adjust lua-Harness test error assertion
@ 2023-12-19 16:27 Igor Munkin via Tarantool-patches
2023-12-20 6:21 ` Sergey Kaplun via Tarantool-patches
0 siblings, 1 reply; 2+ messages in thread
From: Igor Munkin via Tarantool-patches @ 2023-12-19 16:27 UTC (permalink / raw)
To: Sergey Kaplun; +Cc: tarantool-patches
The current pattern in 303-package.t for the test case loading invalid
Lua script is too tight for the following reasons revealed by Tarantool
testing:
* The platform might prepend the common prefix to all Lua errors, so
anchoring the pattern to the beginning of the error message is too
strict for matching the particular errors.
* The platform might canonicalize module names (i.e., use absolute
paths) for searchers and loaders, so matching the current working
directory via "./" is too straight-forward.
Hence, this patch removes the starting anchor from the pattern and fixes
the last part of it to match only the "basename" of the module being
loaded. As a result, the check is not too strict and Lua-specific but
rather starts following common sense.
Signed-off-by: Igor Munkin <imun@tarantool.org>
---
Branch: https://github.com/tarantool/luajit/tree/imun/fix-test-for-tarantool-searchers
PR: https://github.com/tarantool/tarantool/pull/9511
Integration CI is red due to exercises with automatic submodule bumps.
Testing in PR represents the integration part.
test/lua-Harness-tests/303-package.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/lua-Harness-tests/303-package.t b/test/lua-Harness-tests/303-package.t
index ccd7c510..b5b3d9ea 100755
--- a/test/lua-Harness-tests/303-package.t
+++ b/test/lua-Harness-tests/303-package.t
@@ -199,7 +199,7 @@ return complex
f:write [[?syntax error?]]
f:close()
error_matches(function () require('syntax') end,
- "^error loading module 'syntax' from file '%.[/\\]syntax%.lua':",
+ "error loading module 'syntax' from file '.+[/\\]syntax%.lua':",
"function require (syntax error)")
os.remove('syntax.lua') -- clean up
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] test: adjust lua-Harness test error assertion
2023-12-19 16:27 [Tarantool-patches] [PATCH luajit] test: adjust lua-Harness test error assertion Igor Munkin via Tarantool-patches
@ 2023-12-20 6:21 ` Sergey Kaplun via Tarantool-patches
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-12-20 6:21 UTC (permalink / raw)
To: Igor Munkin; +Cc: tarantool-patches
Hi, Igor!
Thanks for the patch!
LGTM!
Side note: I hope that our integrational workflow with Tarantool will be fixed
soon.
--
Best regards,
Sergey Kaplun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-20 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 16:27 [Tarantool-patches] [PATCH luajit] test: adjust lua-Harness test error assertion Igor Munkin via Tarantool-patches
2023-12-20 6:21 ` 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