Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	skaplun@tarantool.org, m.shishatskiy@tarantool.org
Subject: [Tarantool-patches] [PATCH luajit] test: adapt test checking reversed function
Date: Thu, 30 Sep 2021 14:43:37 +0300	[thread overview]
Message-ID: <20210930114337.1575120-1-m.kokryashkin@tarantool.org> (raw)

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


             reply	other threads:[~2021-09-30 11:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 11:43 Maxim Kokryashkin via Tarantool-patches [this message]
2021-10-11 15:28 ` Sergey Kaplun via Tarantool-patches
2021-10-11 20:19   ` Максим Корякшин via Tarantool-patches
2021-10-12  8:16     ` Sergey Kaplun via Tarantool-patches
2022-02-18 19:04     ` Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210930114337.1575120-1-m.kokryashkin@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.shishatskiy@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] test: adapt test checking reversed function' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox