luajit2 icon indicating copy to clipboard operation
luajit2 copied to clipboard

Tests failing for s390x

Open Bisht13 opened this issue 2 years ago • 2 comments

Tests like iter-bug.lua and jit_record.lua are failing and giving the following error from the test suite.

[aditya@clftest misc]$ ~/testing/bin/luajit jit_record.lua 
/home/aditya/testing/bin/luajit: jit_record.lua:1: module 'jit.opt' not found:
	no field package.preload['jit.opt']
	no file './jit/opt.lua'
	no file '~/testing/share/luajit-2.1.0-beta3/jit/opt.lua'
	no file '/usr/local/share/lua/5.1/jit/opt.lua'
	no file '/usr/local/share/lua/5.1/jit/opt/init.lua'
	no file '~/testing/share/lua/5.1/jit/opt.lua'
	no file '~/testing/share/lua/5.1/jit/opt/init.lua'
	no file './jit/opt.so'
	no file '/usr/local/lib/lua/5.1/jit/opt.so'
	no file '~/testing/lib/lua/5.1/jit/opt.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './jit.so'
	no file '/usr/local/lib/lua/5.1/jit.so'
	no file '~/testing/lib/lua/5.1/jit.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'

From the documentation of LuaJIT, the module is built-in and optimization is turned on by default!

This is true as well from the following results (this is compared after commenting out require "jit.opt".start("maxside=0")),

[aditya@clftest misc]$ time lua iter-bug.lua 

real	0m1.062s
user	0m1.059s
sys	0m0.001s
[aditya@clftest misc]$ time ~/testing/bin/luajit iter-bug.lua 

real	0m0.171s
user	0m0.170s
sys	0m0.001s

Bisht13 avatar Jul 08 '22 05:07 Bisht13