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 877636FC82; Thu, 30 Sep 2021 14:43:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 877636FC82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633002223; bh=JIM8xmIX1XxO+GqlcXdKFM+SdtpC/EGm32NEirGpyl0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=D7fhrrG39JNWfqHYNV6q3SMiHaQ8AOjEq4JiQ0URSKGf2JV96nr0rI9sE7gwkaj0E LnEw4qj3n3OUaws3SuJMQSG31Ha9TT6I3ZJtpS9WgQR6Z1fqFJWg3yRu3TOF4718m3 gTPjmnpCSHNrI5xqTAQTz+FP+PLUn4tPsXEtrcjA= Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 21DB66FC82 for ; Thu, 30 Sep 2021 14:43:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 21DB66FC82 Received: by mail-lf1-f52.google.com with SMTP id j5so19195447lfg.8 for ; Thu, 30 Sep 2021 04:43:42 -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=OFpwSw5J2QEcK75pDQvsiW83eAFP1dJPuw980Uz+WuM=; b=1YnZC0N2ZsHKugayY1I2UGNUvIeD9DMko/v3ceBljGUHE+cnd2mbMLas1rsWrN5mHv 8I/ouXTSa2nDquGwBL3mPCJBx4E1cU8TuLL4FLH1AZqe5MIv1XakGW/h410ry3SWAAbM U+FOBKT9Hy5an/Q14AyXBkGt06b+NMKmLmZMmSfyphmRQeK/64wfRaqCGN713ZlqNCgq xXx+pHhPvd8oEqn6kbrQ46gdMDEPoDwmXvwsS7uSqMR7Od/z1omRzPNZgA7RDcschoLk ufUsSw71NF5OS8BWFyEG4cqKqQD20Q3kbqUgy6BgUgZqHss1uuvXYUlNJOH11u1A+udU FYyg== X-Gm-Message-State: AOAM530s9z/zSXh4VXeskkvaYmSNYUAyzk9IanyREK0o67LQhBMWLgav hgB/bwksUtuudTMMQdb1PfjsnWkrl3SPzw== X-Google-Smtp-Source: ABdhPJwKgVa6OF8rvY79+D6r61UIrxu8Eh3Qwr3F1JtSAQI7Zqc0rIzjbY6OzYbr2SV6mWK56Pq8Sw== X-Received: by 2002:a05:6512:1053:: with SMTP id c19mr5338957lfb.283.1633002220980; Thu, 30 Sep 2021 04:43:40 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id d20sm343528lfv.117.2021.09.30.04.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 04:43:40 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org, m.shishatskiy@tarantool.org Date: Thu, 30 Sep 2021 14:43:37 +0300 Message-Id: <20210930114337.1575120-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 test checking reversed function 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" The first fiber in Tarantool has only 512Kb of the stack which is not enough to handle such a deep call chain. The test is adapted to Tarantool by decreasing the string length. Closes tarantool/tarantool#5782 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- GitHub branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-5782-adapt-deep-nest-gsub-PUC-Rio Issue: https://github.com/tarantool/tarantool/issues/5782 test/PUC-Rio-Lua-5.1-tests/pm.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/PUC-Rio-Lua-5.1-tests/pm.lua b/test/PUC-Rio-Lua-5.1-tests/pm.lua index e364ff9d..7da3ef4a 100644 --- a/test/PUC-Rio-Lua-5.1-tests/pm.lua +++ b/test/PUC-Rio-Lua-5.1-tests/pm.lua @@ -206,12 +206,11 @@ function rev (s) return string.gsub(s, "(.)(.+)", function (c,s1) return rev(s1)..c end) end -local x = string.rep('012345', 10) --- FIXME: The first Tarantool's fiber has only 512Kb of stack. --- It is not enough for this recursive call. +-- This test is adapted to match the stack size (512Kb) of the first fiber in +-- Tarantool. -- See also https://github.com/tarantool/tarantool/issues/5782. --- The test is disabled for Tarantool binary. --- assert(rev(rev(x)) == x) +local x = string.rep('01234', 10) +assert(rev(rev(x)) == x) -- gsub with tables -- 2.33.0