[CMake] ENOEXEC exit code from ctest on FreeBSD

Eric Noulard eric.noulard at gmail.com
Mon Jul 9 02:14:37 EDT 2018


Le lun. 9 juil. 2018 à 07:14, Anoop C S <anoopcs at autistici.org> a écrit :

> Hi all,
>
> While running tests from a wip branch[1] for socket_wrapper project I
> noticed the following output
> on FreeBSD:
>
>
Your issue seems more related with the "socker wrapper" project than with
CMake/CTest but...


> Following that I ran one among the failed tests from the above list using
> `ctest`:
>
> # ctest -R test_thread_echo_tcp_connect
> Test project /root/build
>     Start 21: test_thread_echo_tcp_connect
> 1/1 Test #21: test_thread_echo_tcp_connect .....***Failed    0.07 sec
>
> 0% tests passed, 1 tests failed out of 1
>
> Total Test time (real) =   0.07 sec
>
> The following tests FAILED:
>          21 - test_thread_echo_tcp_connect (Failed)
> Errors while running CTest
>

If you want to have more verbose output from ctest you an run:

ctest -R test_thread_echo_tcp_connect -VV

and ctest will spit out whatever output "test_thread_echo_tcp_connect" is
giving.
otherwise did you try to run the test "manually" without ctest:

from
https://git.cryptomilk.org/users/asn/socket_wrapper.git/tree/tests/CMakeLists.txt?h=master-fix
it looks like the test executable is:

test_thread_echo_tcp_connect

so try running:

./test_thread_echo_tcp_connect

and whether it fails or not.



> # uname -a
> FreeBSD bazinga.localdomain 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309:
> Fri Jul 21 02:08:28 UTC
> 2017     root at releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>
>
You seem to be compiling and running your tests as 'root' user. This is
usually not a good idea
(even if it may not have anything to do with your failure).


> I couldn't see any genuine errors from the test logs as such. Am I missing
> something? Since I am a
> newbie to FreeBSD(and also to cmake) I would require some help to debug
> the reason for ENOEXEC exit
> code.
>

Try running in verbose mode, you may even debug into the test if you run
the test without ctest.


>
> Note:- The failed test cases uses threads.
> [1]
> https://git.cryptomilk.org/users/asn/socket_wrapper.git/log/?h=master-fix
>
>
Then I suggest you ask on the project mailing list what may make this test
fail.

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180709/a682da73/attachment.html>


More information about the CMake mailing list