Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <max.kokryashkin@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] test: adapt disabled tests from PUC-Rio
Date: Fri, 8 Oct 2021 11:54:51 +0300	[thread overview]
Message-ID: <YWAHWyCI1efdtcU/@root> (raw)
In-Reply-To: <20210924135814.58102-1-m.kokryashkin@tarantool.org>

Hi, Maxim!

Thanks for the patch!

Please answer my questions below.

On 24.09.21, Maxim Kokryashkin wrote:
> Version and status are printed in stdout instead stderr
> since LuaJIT-2.0.0-beta11 (as it is not an error message). This behavior

Please mention the corresponding commit.

> is the same as in Lua 5.2, so necessary changes in tests can be
> adapted from PUC-Rio Lua 5.2 test suite.
> 
> Closes tarantool/tarantool#5687
> ---
> Issue: https://github.com/tarantool/tarantool/issues/5687
> Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-5687-adapt-tests-output-PUC-Rio

Please provide Tarantool branch too. It is convinient to reviewer to
check that CI is OK.

> 
>  test/PUC-Rio-Lua-5.1-tests/main.lua | 53 +++++++++++++++++++----------
>  1 file changed, 35 insertions(+), 18 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..34e028f5 100644
> --- a/test/PUC-Rio-Lua-5.1-tests/main.lua
> +++ b/test/PUC-Rio-Lua-5.1-tests/main.lua
> @@ -24,11 +24,33 @@ local prepfile = function (s, p)

<snipped>

> +-- Test is adapted from PUC-Rio Lua 5.2 test suite.
> +-- See comment for checkprogout().
>  prepfile("a = [[b\nc\nd\ne]]\n=a")
>  print(prog)
> --- FIXME: Behavior is different for LuaJIT. See the comment above.
> --- RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
> --- checkout("b\nc\nd\ne\n\n")
> +RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
> +checkprogout("b\nc\nd\ne\n\n")
>  
> +-- Test is adapted from PUC-Rio Lua 5.2 test suite.
> +-- See comment for checkprogout().
>  prompt = "alo"
>  prepfile[[ --
>  a = 2
>  ]]
> --- FIXME: Behavior is different for LuaJIT. See the comment above.
> --- RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
> --- checkout(string.rep(prompt, 3).."\n")
> +RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
> +checkprogout(string.rep(prompt, 3).."\n")

Lua 5.2 test suite has the different test here:

| RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
| local t = getoutput()
| assert(string.find(t, prompt .. ".*" .. prompt .. ".*" .. prompt))

Why did you change it?

>  
>  s = [=[ --
>  function f ( x )

Why didn't you adjust the next test with multiple returns too?
See the issue's comment for example [1].

> -- 
> 2.33.0
> 

[1]: https://github.com/tarantool/tarantool/issues/5687#issuecomment-758682525

-- 
Best regards,
Sergey Kaplun

  parent reply	other threads:[~2021-10-08  8:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 13:58 Maxim Kokryashkin via Tarantool-patches
2021-09-24 14:34 ` Максим Корякшин via Tarantool-patches
2021-10-08  8:58   ` Sergey Kaplun via Tarantool-patches
2021-10-13 15:55     ` [Tarantool-patches] [PATCH luajit v2] " Maxim Kokryashkin via Tarantool-patches
2021-12-16 15:04       ` Sergey Kaplun via Tarantool-patches
2022-01-21 11:41         ` Максим Корякшин via Tarantool-patches
2022-02-16 10:37           ` Igor Munkin via Tarantool-patches
2022-02-16 10:37         ` Igor Munkin via Tarantool-patches
2022-02-17 12:01           ` Maxim Kokryashkin via Tarantool-patches
2022-02-16 10:37       ` Igor Munkin via Tarantool-patches
2021-10-08  8:54 ` Sergey Kaplun via Tarantool-patches [this message]
2022-02-17 16:38 ` [Tarantool-patches] [PATCH luajit] " 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=YWAHWyCI1efdtcU/@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] test: adapt disabled tests from PUC-Rio' \
    /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