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 5EEA86EC40; Fri, 24 Sep 2021 17:29:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5EEA86EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632493750; bh=HeRshchWgpad4oLy3hK4ygHrpVjhb1po1GmsfHIoIs4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ufmyx9u/h0kpyqLyEjSfxT2uiTuhCPfco3iTKgiET3lCXcjX3YQnhYiYb9kAdunO0 fud2loq/bF4tvZpiTccoENYWWJm9MLv9Vdrgq7wAwCKQ/SNC8M88CKJ7wqao/L67T8 qRYDaqwM652DqgW6dkkcP4i3jVsBKzqkyoqPAcMw= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7C1256EC40 for ; Fri, 24 Sep 2021 17:29:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7C1256EC40 Received: by mail-lf1-f53.google.com with SMTP id u8so40303030lff.9 for ; Fri, 24 Sep 2021 07:29:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FeHE+sbGPw4IkP1d9j3a9ge4OZkCppaH1/IUH/jZV1A=; b=d0lZbBrrXNpu6IDjWB/49t0ejbFi2ZhGrL9ePTVZqiGceKn/fgu6lHaIQHhbu5QvTc uLU0WyoaQ8eAx0vnHK0eT681rdNRx8uPSNLeEElYB//WYHlYN0aTXSqCMBR865YXebGY OX0w+LXvYM4fX2L+qYQToCJNlibNn/YsPh85IikNKWvz7NG3pQ0p4F2osK3OlnCkY9c0 MxGY6fpvwm721nSRdxt1/ua9Kg7h4de1DPCZSizQ78yE4N5osGpqd7jR0Ob0acjZmp9u 4QSEyseY0EJv1ceL7FKcRMLpk5GIVVv435jLFdrVyBIL+QKZSUCPW64WFMkD1Hzh/7Ix 811A== X-Gm-Message-State: AOAM532mnvX8DcvjtuvLTNvJb3evV3bMa+a7XZMka+m0J/mp1U0QuEmi v5XWpHhfV4N855DmDHMlZOWW6YIlBjw/QGgL X-Google-Smtp-Source: ABdhPJw5YqsEz65nwU89MiwE3YjwK9F7mk/p58zwt2LtsPEUVFegX4/Epy9uFTlKejY7xodMobvTmg== X-Received: by 2002:a2e:a555:: with SMTP id e21mr11639939ljn.490.1632493740978; Fri, 24 Sep 2021 07:29:00 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id n9sm767700lfh.267.2021.09.24.07.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 07:29:00 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Fri, 24 Sep 2021 17:28:57 +0300 Message-Id: <20210924142857.66614-1-m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 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 --- 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") -- close Lua with an open file prepfile(string.format([[io.output(%q); io.write('alo')]], out)) -- 2.33.0