<HTML><BODY><div>Thanks for the review, Sergey!</div><div>Here is the new commit message, with your comment in mind:</div><div>=============================================================</div><div><div> test: refactor with _dofile</div><div> </div><div> The patch[1] from the lua-Harness suite is quite similar to commit<br> d11c5bbc08a118b11167c5d455d4024607dab662 ('test: adjust lua-Harness<br> tests that use dofile'), with the one difference (except the naming):<br> `make_specific_checks()` provides the particular behaviour to run the<br> tests for out-of-source build, however `_dofile()` allows user to<br> overload this function considering his purposes. If user leave<br> `_dofile()` untouched, it defaults to `dofile()` Lua standard library<br> function.</div><div> </div><div> It's worth to mention, that LuaJIT testing machinery has been using<br> such approach since commit 734cc0f1d508429c2c3c46bd1860398db0051060<br> ('test: adapt PUC-Rio suite for out-of-source build') and `_dofile()`<br> behaviour for running tests when out of source build is used is<br> already defined in luajit-test-init.lua.</div><div> </div><div> [1]: <a href="https://framagit.org/fperrad/lua-Harness/-/commit/60da289">https://framagit.org/fperrad/lua-Harness/-/commit/60da289</a></div><div> </div><div> Part of tarantool/tarantool#5970<br> Part of tarantool/tarantool#4473</div></div><div>=============================================================</div><div> </div><div>As for your side note, I’ll add the requested comment to the tarantool repo along with</div><div>the luajit bump commit later on.</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16273785651045511180_BODY">Hi, Maxim!<br><br>Thanks for the patch!<br>LGTM, except the nitpick regarding the commit message.<br><br>On 26.07.21, Максим Корякшин wrote:<br>><br>> Thanks for the review, Igor!<br>> Here is the diff, that fixes typos in luajit-test-init.lua:<br>> <br>> =================================================<br>> diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua<br>> index feec17cf..acd3d60e 100644<br>> --- a/test/luajit-test-init.lua<br>> +++ b/test/luajit-test-init.lua<br>> @@ -2,8 +2,8 @@<br>> -- `_loadfile()` exists and uses it for code loading from test<br>> -- files. If the variable is not defined then suite uses<br>> -- `loadfile()` as default. Same for the `_dofile()`.<br>> --- Lua-Harness also uses the same implementation of `dofile()`<br>> --- fot he same reason<br>> +-- lua-Harness also uses the same implementation of `dofile()`<br>> +-- for the same reason.<br>> -- XXX: Some tests in PUC Rio Lua 5.1 test suite clean `arg`<br>> -- variable, so evaluate this once and use later.<br>> =================================================<br>> <br>> >Max,<br>> ><br>> >Thanks for the fixes! LGTM, except the three typos in<br>> >luajit-test-init.lua.<br>> ><br>> >On 20.07.21, Maxim Kokryashkin wrote:<br><br><br>> >> The patch[1] from lua-Harness suite is quite similar to commit<br><br>Typo: s/from lua-Harness suite/from the lua-Harness suite/<br><br>> >> d11c5bbc08a118b11167c5d455d4024607dab662 ('test: adjust lua-Harness<br>> >> tests that use dofile'), with the one difference (except the naming):<br>> >> `make_specific_checks()` provides the particular behaviour to run the<br>> >> tests for out-of-source build, however `_dofile()` allows user to<br>> >> overload this function considering his purposes. If user leave<br>> >> `_dofile()` untouched, it defaults to `dofile()` Lua standard library<br>> >> function.<br>> >><br>> >> It's worth to mention, that LuaJIT testing machinery has been using<br>> >> such approach since commit 734cc0f1d508429c2c3c46bd1860398db0051060<br>> >> ('test: adapt PUC-Rio suite for out-of-source build') and `_dofile()`<br>> >> behaviour for running tests when out of source build is used is<br>> >> already defined in luajit-test-init.lua.<br>> >><br>> >> [1]: <a href="https://framagit.org/fperrad/lua-Harness/-/commit/60da289" target="_blank">https://framagit.org/fperrad/lua-Harness/-/commit/60da289</a><br>> >><br>> >> Part of tarantool/tarantool#5970<br>> >> Part of tarantool/tarantool#4473<br>> >> ---<br>> >> test/lua-Harness-tests/101-boolean.t | 2 +-<br>> >> test/lua-Harness-tests/102-function.t | 2 +-<br>> >> test/lua-Harness-tests/103-nil.t | 2 +-<br>> >> test/lua-Harness-tests/104-number.t | 2 +-<br>> >> test/lua-Harness-tests/105-string.t | 2 +-<br>> >> test/lua-Harness-tests/106-table.t | 2 +-<br>> >> test/lua-Harness-tests/107-thread.t | 2 +-<br>> >> test/lua-Harness-tests/108-userdata.t | 2 +-<br>> >> test/lua-Harness-tests/203-lexico.t | 8 ++++----<br>> >> test/lua-Harness-tests/231-metatable.t | 2 +-<br>> >> test/lua-Harness-tests/301-basic.t | 2 +-<br>> >> test/lua-Harness-tests/305-utf8.t | 4 ++--<br>> >> test/lua-Harness-tests/404-ext.t | 2 +-<br>> >> test/lua-Harness-tests/test_assertion.lua | 10 ++--------<br>> >> test/luajit-test-init.lua | 2 ++<br>> >> 15 files changed, 21 insertions(+), 25 deletions(-)<br>> >><br>> ><br>> ><snipped><br>> ><br>> >> diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua<br>> >> index 54a1f815..feec17cf 100644<br>> >> --- a/test/luajit-test-init.lua<br>> >> +++ b/test/luajit-test-init.lua<br>> >> @@ -2,6 +2,8 @@<br>> >> -- `_loadfile()` exists and uses it for code loading from test<br>> >> -- files. If the variable is not defined then suite uses<br>> >> -- `loadfile()` as default. Same for the `_dofile()`.<br>> >> +-- Lua-Harness also uses the same implementation of `dofile()`<br>> ><br>> >Typo: s/Lua-Harness/lua-Harness/.<br>> ><br>> >> +-- fot he same reason<br>> ><br>> >Typo: s/fot/for/.<br>> >Typo: Dot is missing at the end of the sentence.<br>> ><br><br>Side note: I suppose the same comment should be added in the Tarantool's<br>init file.<br><br>> >><br>> >> -- XXX: Some tests in PUC Rio Lua 5.1 test suite clean `arg`<br>> >> -- variable, so evaluate this once and use later.<br>> >> --<br>> >> 2.32.0<br>> >><br>> ><br>> >--<br>> >Best regards,<br>> >IM<br>> <br>> <br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></div></blockquote></BODY></HTML>