Building 0.0.1 on Ubuntu builders with tests enabled (which is a pre-requirement to move toward installing libcamera by default in Ubuntu) we are hitting some tests failure Log on https://launchpadlibrarian.net/635747443/buildlog_ubuntu-lunar-amd64.libcamera_0.0.1-4ubuntu1~build3_BUILDING.txt.gz Summary of Failures: 17/72 libcamera:log / log_process FAIL 0.21s (exit status 255 or signal 127 SIGinvalid) 18/72 libcamera:ipc / unixsocket_ipc FAIL 2.01s (exit status 255 or signal 127 SIGinvalid) 24/72 libcamera:process / process_test FAIL 0.01s (exit status 255 or signal 127 SIGinvalid) Ok: 34 Expected Fail: 0 Fail: 3 Unexpected Pass: 0 Skipped: 35 Timeout: 0 The same errors are hit in a local pbuilder chroot type of environment # /build/libcamera-0.0.1/obj-x86_64-linux-gnu/test/log/log_process [3:10:42.401700367] [45975] ERROR Process process.cpp:312 Failed to unshare execution context: Operation not permitted exit code should be 42, actual is 1 # /build/libcamera-0.0.1/obj-x86_64-linux-gnu/test/ipc/unixsocket_ipc [3:11:30.902229335] [48243] ERROR Process process.cpp:312 Failed to unshare execution context: Operation not permitted [3:11:32.904122733] [48243] ERROR IPCPipe ipc_pipe_unixsocket.cpp:134 Call timeout! [3:11:32.904169372] [48243] ERROR IPCPipe ipc_pipe_unixsocket.cpp:66 Failed to call sync Failed to call get value Wrong initial value, expected 1337, got -110 # /build/libcamera-0.0.1/obj-x86_64-linux-gnu/test/process/process_test [3:12:06.868548239] [54068] ERROR Process process.cpp:312 Failed to unshare execution context: Operation not permitted exit code should be 42, actual is 1 The same tests are working in a lxc container so it might have to do with the environment or permissions
test/file is also failing on ppc64el https://launchpadlibrarian.net/635893123/buildlog_ubuntu-lunar-ppc64el.libcamera_0.0.1-4ubuntu1~build3.1_BUILDING.txt.gz command: MALLOC_PERTURB_=233 /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/test/file ----------------------------------- stderr ----------------------------------- Mapping of file region failed should it be reported as a separate issue?
Hi Sebastien, Could you try the patch from You-Sheng Yang and look at cleaning it up perhaps please? https://patchwork.libcamera.org/patch/9330/ Try to remove as many of those ifdefs as possible. Also please check if we really need to add another dependency for this, or if we can do it directly without requiring an external library. Overall - lets try to keep these changes minimal - afterall, this is working around making tests work on a system that /can't/ actually do many of the tests anyway in a constrained environment, which really is making the requirement of running the tests ... well somewhat limited?
(In reply to Sebastien Bacher from comment #1) > test/file is also failing on ppc64el > > https://launchpadlibrarian.net/635893123/buildlog_ubuntu-lunar-ppc64el. > libcamera_0.0.1-4ubuntu1~build3.1_BUILDING.txt.gz > > command: MALLOC_PERTURB_=233 > /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/test/file > ----------------------------------- stderr > ----------------------------------- > Mapping of file region failed > > > should it be reported as a separate issue? Yes, that sounds like a separate issue to me. Will you be investigating this to fix it? I don't think we have any PPC64 hardware, and I am not quite sure there will be many use cases for us to support libcamera on PPC hardware ?
@Kleran, thanks for the reply. I tried the patch from You-Sheng Yang but it doesn't seem to make a difference (maybe I adapted it wrong?). I agree it's a low priority issue, it would be nice if those tests would be marked as to skip in restricted builder environments but it's not user impacting. About the ppc64el test failing, I've shell access to an environment where I can do debugging and confirmed the error but the tests isn't providing more details. You are right that ppc is probably not really a target arch which also make it a low priority problem (sometime errors on those archs are sign of endianess issues or similar). It's also a low one on my todolist and I don't know my way around the code enough to efficiently debug but if/when I get to it I will open a new ticket with the debugging details I could figure out.