Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the Test Suite #103

Open
Chillance opened this issue Feb 27, 2024 · 9 comments
Open

Running the Test Suite #103

Chillance opened this issue Feb 27, 2024 · 9 comments

Comments

@Chillance
Copy link

This is nice project!

I wanted to test running the test suite to see all is OK and then also to test with the latest 5.4.6. However, I'm not sure how to do that. Documentation say to run golua -u -e "_U=true" all.lua but there is no all.lua file.

@arnodel
Copy link
Owner

arnodel commented Feb 28, 2024

Thank you!

The Lua test suite is not included in this project, as it is a PR on the "official" Lua test suite, as some test cannot run on golua. The PR is here: arnodel/golua-tests#3

Clone it and run golua -u -e "_U=true" from its root (assuming golua is installed and on your $PATH). I realise this is not the latest version of the test suite (it's forked off the 5.4.3 test suite) but I haven't yet had time to update it.

Does that address your issue?

@Chillance
Copy link
Author

Chillance commented Feb 29, 2024

Ah, it's a separate repository! The documentation made it seem I ran that command in this repository.

Any idea when that PR will be merged? Also, what's with changing the test cases? I checked some files and it seems fine, not any cheating going on.

My whole point with this was to just run golua with the latest Lua test cases to see how well it performs.

This project having everything in Go AND including a way to run the official Lua testsuite is quite fantastic if you ask me. It's a very good way to make sure golua works with Lua files. It's a very good indicator of how robust this project is.

@Chillance
Copy link
Author

I assume I can't just use the Lua files from lua-5.4.6-tests.tar.gz as is to test against the latest? It would be nice if it worked that way.

@arnodel
Copy link
Owner

arnodel commented Feb 29, 2024 via email

@Chillance
Copy link
Author

So, what's left to do in the PR?

@arnodel
Copy link
Owner

arnodel commented Feb 29, 2024 via email

@arnodel
Copy link
Owner

arnodel commented Feb 29, 2024 via email

@Chillance
Copy link
Author

So, I started to with the golua5.4 branch and adding files from the 5.4.6 lua test suite updating files like you did with commenting out things that weren't supported or otherwise. However, I didn't come far until there were issues.

calls.lua:

k:1:1: invalid token: illegal character near '\27'
in function assert (file [Go])
in function <main chunk> (file calls.lua:355)

which is this:

do   -- another bug (since 5.2)
  -- corrupted binary dump: list of upvalue names is larger than number
  -- of upvalues, overflowing the array of upvalues.
  local code =
   "\x1b\x4c\x75\x61\x54\x00\x19\x93\x0d\x0a\x1a\x0a\x04\x08\x08\x78\x56\z
    \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x77\x40\x00\x86\x40\z
    \x74\x65\x6d\x70\x81\x81\x01\x00\x02\x82\x48\x00\x02\x00\xc7\x00\x01\z
    \x00\x80\x80\x80\x82\x00\x00\x80\x81\x82\x78\x80\x82\x81\x86\x40\x74\z
    \x65\x6d\x70"

  assert(load(code))   -- segfaults in previous versions
end

and commenting that out and doing other changes you did I came to the coroutine.lua which hangs at:

to-be-closed variables in coroutines
testing 'coroutine.close'

So yeah, I think this is a bit too much for me to go through as I'm not familiar with golua.

@arnodel
Copy link
Owner

arnodel commented Mar 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants