[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.3w2 Test Suite Issues
- From: Paige DePol <lual@...>
- Date: Sun, 30 Mar 2014 07:55:25 -0500
I have encountered the following errors when running the 'all.lua' test script. I am using OSX 10.9.2, which is a 64-bit platform. Also note that I am running the complete test suite, not the _U basic version.
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
main.lua fails the assertion at line 182:
assert(string.find(t, prompt .. ".*" .. prompt .. ".*" .. prompt))
This error seems to be caused by checking the output for the presence of the prompts, however, it does not appear that the interpreter outputs the prompts when input is redirected via a file.
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
sort.lua fails the assertion at line 31:
assert(not pcall(unpack, {}, 0, 2^31-1))
This line generates a segfault if the Optimisation Level compiler flag is set to any option other than None! The segfault happens in the 'unpack' function in 'ltablib.c' because it appears the optimiser is messing up the 'n <= 0' check, which allows the program to enter the while loop with invalid data.
It took me a while to track down this problem, I was really confused as to why the <= operator seemed to be broken! For now I am building with no optimisation, however, does anyone know why this happens and hopefully have a solution to the problem?
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
strings.lua fails the assertion at line 265:
assert("alo" < "álo" and "álo" < "amo")
I am unsure where the error here is, if I print out the current locale right before the assert statement I get the following: "pt_BR/C/C/C/C/C". No matter which locale I try this assertion fails every time.
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
attrib.lua fails the assertion at line 222:
assert(not f and type(err) == "string" and when == "absent")
The value for "when" is "open", which indicates that the system has the ability to load binary libraries. I have compiled the lib1.c file using the gcc command in the header of the file, with the addition of adding "-I../../src" to point to the Lua source directory for includes.
However, when the system tries to load the library it reports that it is unable find the symbol "_luaL_checkversion_" via dynamic lookup. I tried building the interpreter without stripping symbols but the error persists, perhaps someone with more experience with dynamic libraries could shed some light on this error?
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
files.lua fails the assertion at line 547:
assert(x == nil and y == v[2]) -- correct status and 'what'
This failure occurs when the following entry from the 'tests' table is being executed:
{"sh -c 'kill -s HUP $$'", "exit"}
From what I can determine this test needs to check for "signal", not "exit". Once I changed the test to "signal" the assertion no longer fails. I don't know if this is an OSX specific issue.
For now I have changed the requirement of the test from "exit" to "signal", please let me know if this is wrong.
----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ ----- ~ -----
Other than the issues detailed above the entire test suite (with the exception of testC) completes successfully. I realise that Lua 5.3 is still under very active development, so I hope this error report helps to fix some potential issues! :)
~pmd~