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

Failing tests on x86_64 #197

Open
kbara opened this issue May 26, 2016 · 5 comments
Open

Failing tests on x86_64 #197

kbara opened this issue May 26, 2016 · 5 comments

Comments

@kbara
Copy link
Contributor

kbara commented May 26, 2016

Several tests fail on x86_64 linux, with and without sudo. Is this expected behaviour?

The following tests were run with 214550a , on x86_64 with a 4.4.4-040404-generic kernel, and an Ubuntu 14.04 userspace.

% luajit test/test.lua
Success : 98% - 270 / 274 (total of 275 tests, 1 skipped)
% sudo luajit test/test.lua
Success : 97% - 327 / 335 (total of 336 tests, 1 skipped)

Details:

Test failures without sudo:
Failed tests:
-------------
>>> test_aio:test_aio failed
./test/linux.lua:859: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:859: in function 'test_aio'
    [string "test_aio:test_aio()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_cancel failed
./test/linux.lua:931: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:931: in function 'test_aio_cancel'
    [string "test_aio:test_aio_cancel()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_error failed
./test/linux.lua:884: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:884: in function 'test_aio_error'
    [string "test_aio:test_aio_error()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_eventfd failed
./test/linux.lua:955: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:955: in function 'test_aio_eventfd'
    [string "test_aio:test_aio_eventfd()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
With sudo
Failed tests:
-------------
>>> test_bpf_root:test_bpf_map_create failed
./syscall/linux/syscalls.lua:826: cannot convert 'struct 1314' to 'unsigned int'
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__newindex'
    ./syscall/linux/syscalls.lua:826: in function 'bpf_map_op'
    ./test/linux.lua:1323: in function 'test_bpf_map_create'
    [string "test_bpf_root:test_bpf_map_create()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio failed
./test/linux.lua:859: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:859: in function 'test_aio'
    [string "test_aio:test_aio()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_cancel failed
./test/linux.lua:931: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:931: in function 'test_aio_cancel'
    [string "test_aio:test_aio_cancel()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_error failed
./test/linux.lua:884: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:884: in function 'test_aio_error'
    [string "test_aio:test_aio_error()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_aio:test_aio_eventfd failed
./test/linux.lua:955: attempt to index local 'fd' (a nil value)
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function '__index'
    ./test/linux.lua:955: in function 'test_aio_eventfd'
    [string "test_aio:test_aio_eventfd()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_file_operations:test_copy_dev_zero_root failed
./syscall/helpers.lua:22: Permission denied
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function <./include/luaunit/luaunit.lua:478>
    [C]: in function 'error'
    ./syscall/helpers.lua:22: in function 'assert'
    test/test.lua:828: in function 'test_copy_dev_zero_root'
    [string "test_file_operations:test_copy_dev_zero_root()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_bridge_linux:test_bridge failed
./syscall/helpers.lua:22: expect to find bridge in list
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function <./include/luaunit/luaunit.lua:478>
    [C]: in function 'error'
    ./syscall/helpers.lua:22: in function 'assert'
    ./test/linux.lua:1178: in function 'test_bridge'
    [string "test_bridge_linux:test_bridge()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
>>> test_netlink:test_newlink_newif_bridge_root failed
./syscall/helpers.lua:22: expect to find new bridge
stack traceback:
    ./include/luaunit/luaunit.lua:479: in function <./include/luaunit/luaunit.lua:478>
    [C]: in function 'error'
    ./syscall/helpers.lua:22: in function 'assert'
    ./test/linux.lua:586: in function 'test_newlink_newif_bridge_root'
    [string "test_netlink:test_newlink_newif_bridge_root()"]:1: in main chunk
    [C]: in function 'xpcall'
    ./include/luaunit/luaunit.lua:482: in function 'runTestMethod'
    ./include/luaunit/luaunit.lua:507: in function 'runTestMethodName'
    ./include/luaunit/luaunit.lua:536: in function 'runTestClassByName'
    ./include/luaunit/luaunit.lua:570: in function <./include/luaunit/luaunit.lua:542>
    test/test.lua:2508: in main chunk
    [C]: at 0x00405010
@justincormack
Copy link
Owner

Odd, no I dont know why, will investigate...

@justincormack
Copy link
Owner

My guess is that your kernel doesn't have support for some of these things and it is erroring (which should be skipped but its hard to check), but will look into it. Your kernel doesnt match your userspace, but that shouldnt matter.

@kbara
Copy link
Contributor Author

kbara commented Aug 10, 2016

So, the intent is that all the tests should pass (or be skipped)?

I've run the tests again, against the same ljsyscall version and master ( c8baf9e ), with the same results. I'm still using the same kernel, but a 16.04 userspace now.

@justincormack
Copy link
Owner

Ideally, but in many cases it is hard to know how a kernel will fail so
this does happen. Are you using the standard 16.04 kernel? If so I can
check what is happening.

On 10 Aug 2016 2:00 p.m., "kbara" notifications@github.com wrote:

So, the intent is that all the tests should pass (or be skipped)?

I've run the tests again, against the same ljsyscall version and master (
c8baf9e
c8baf9e
), with the same results. I'm still using the same kernel, but a 16.04
userspace now.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#197 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAdcPBSgizckQtIHVCyvLc4FaYwEVmRYks5qectYgaJpZM4InoAz
.

@kbara
Copy link
Contributor Author

kbara commented Aug 10, 2016

That wasn't the standard kernel, but I believe 4.4.0-34-generic is the standard kernel, and I get the same results with it as well.

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