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 A9EA76F3F2; Mon, 11 Oct 2021 17:26:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A9EA76F3F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633962419; bh=x5Y5b60twQfy/WX7d4JiZ4lCX/P6TtlGr2OQs/767tI=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SJ0gCDG1PVBtxR1UTdenUX5ztGiiQwaqih/tJnaPTkGKyqtPicbch+KGLAm11ryPW 016vT1uprpg94iOHICNZt/1WNzR+cd+WIFoUpdP/0wSx6uLIyWswd64tbJufZ4/yHy ohSSWwVrg18BxHsGEfS5h3dMt3qnLYd/eMBOBO9c= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D790D6F3F2 for ; Mon, 11 Oct 2021 17:26:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D790D6F3F2 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mZwGX-0006lp-0l; Mon, 11 Oct 2021 17:26:57 +0300 Date: Mon, 11 Oct 2021 17:25:16 +0300 To: Maxim Kokryashkin Message-ID: References: <20210924142857.66614-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210924142857.66614-1-m.kokryashkin@tarantool.org> X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD922964B4BA091D9AC6E55C33129285D51DCD26C1629ECC3AC182A05F538085040867DD47D0816BFC8D4DF412BA12D394C5DD60BE17724E8AC7C01263F70672A82 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D4360D888D8F9BE48638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83793EC5836EC5A43C8A778B8F74D32B8117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C837C4FEFBD186071C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5946777070D36311E25EEED8BA6EC367781D4C58B8F0C2365D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA759D2A03B9C34326B3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340D3A19269BBEBAAF35A16CC49DD4AD338C5CECAE12C74069520C5922E1DF7195F9C544E430D15F151D7E09C32AA3244C7EBE4BC08A748042B2183289EBFAD69C250262A5EE9971B0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioju/+AAevgYAVEdCxrmbYzBA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DA21975728F17DAADFB1C21548198AC130FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED567EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] test: adapt tests checking loading bytecode files 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the patch! LGTM, except a few comments below. On 24.09.21, Maxim Kokryashkin wrote: > Loading bytecode with an extra header (BOM or "#") is disabled > for security reasons since LuaJIT-2.0.0-beta10. > For more information see comment for `lj_lex_setup()` in . > Also see commit 53a285c ('Disable Nit: It is better to use the full commit hash here to avoid clashing. > loading bytecode with an extra header (BOM or #!).'). > Tests are adapted to LuaJIT behavior. > > Closes tarantool/tarantool#5691 > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 Looks like it should be 5870 instead. 5873 is a unbrella for all tests activities. > --- Also, please attach tarantool branch with CI to check it is OK. > Issue: https://github.com/tarantool/tarantool/issues/5691 > Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-5691-adapt-bytecode-PUC-Rio > > test/PUC-Rio-Lua-5.1-tests/main.lua | 16 +++++----------- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/test/PUC-Rio-Lua-5.1-tests/main.lua b/test/PUC-Rio-Lua-5.1-tests/main.lua > index 07facc4c..c62950c8 100644 > --- a/test/PUC-Rio-Lua-5.1-tests/main.lua > +++ b/test/PUC-Rio-Lua-5.1-tests/main.lua > @@ -172,23 +172,17 @@ prepfile(s) > prepfile[[#comment in 1st line without \n at the end]] > RUN("lua %s", prog) > > --- FIXME: Loading bytecode with an extra header (BOM or "#") > +-- Loading bytecode with an extra header (BOM or "#") > -- is disabled for security reasons since LuaJIT-2.0.0-beta10. > -- For more information see comment for `lj_lex_setup()` > -- in . > -- Also see commit 53a285c0c3544ff5dea7c67b741c3c2d06d22b47 > -- (Disable loading bytecode with an extra header (BOM or #!).). > -- See also https://github.com/tarantool/tarantool/issues/5691. > --- The test is disabled for LuaJIT. > -prepfile("#comment with a binary file\n"..string.dump(loadstring("print(1)"))) > --- RUN("lua %s > %s", prog, out) > --- checkout("1\n") > - > -prepfile("#comment with a binary file\r\n"..string.dump(loadstring("print(1)"))) > --- FIXME: Behavior is different for LuaJIT. See the comment above. > --- The test is disabled for LuaJIT. > --- RUN("lua %s > %s", prog, out) > --- checkout("1\n") > +-- The test is adapted to LuaJIT behavior. > +prepfile(string.dump(loadstring("print(1)"))) > +RUN("lua %s > %s", prog, out) > +checkout("1\n") May be it is better to test `NoRun()` for 1 binary file with a comment at the first string and `Run()` for another binary file without the comment. > > -- close Lua with an open file > prepfile(string.format([[io.output(%q); io.write('alo')]], out)) > -- > 2.33.0 > -- Best regards, Sergey Kaplun