Re: [CMake] ENOEXEC exit code from ctest on FreeBSD

2018-07-08 Thread Eric Noulard
Le lun. 9 juil. 2018 à 07:14, Anoop C S  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 .***Failed0.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 r...@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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] ENOEXEC exit code from ctest on FreeBSD

2018-07-08 Thread Anoop C S
Hi all,

While running tests from a wip branch[1] for socket_wrapper project I noticed 
the following output
on FreeBSD:

# make test
Running tests...
Test project /root/build
  Start  1: test_ioctl
 1/25 Test  #1: test_ioctl .   Passed0.03 sec
  Start  2: test_tcp_listen
 2/25 Test  #2: test_tcp_listen    Passed0.03 sec
  Start  3: test_tcp_dup2
 3/25 Test  #3: test_tcp_dup2 ..   Passed0.03 sec
  Start  4: test_fcntl
 4/25 Test  #4: test_fcntl .   Passed0.03 sec
  Start  5: test_echo_tcp_connect
 5/25 Test  #5: test_echo_tcp_connect ..   Passed0.07 sec
  Start  6: test_echo_tcp_bind
 6/25 Test  #6: test_echo_tcp_bind .   Passed0.34 sec
  Start  7: test_echo_tcp_socket_options
 7/25 Test  #7: test_echo_tcp_socket_options ...   Passed0.23 sec
  Start  8: test_echo_tcp_sendmsg_recvmsg
 8/25 Test  #8: test_echo_tcp_sendmsg_recvmsg ..   Passed0.19 sec
  Start  9: test_echo_tcp_write_read
 9/25 Test  #9: test_echo_tcp_write_read ...   Passed0.13 sec
  Start 10: test_echo_tcp_writev_readv
10/25 Test #10: test_echo_tcp_writev_readv .   Passed0.16 sec
  Start 11: test_echo_tcp_get_peer_sock_name
11/25 Test #11: test_echo_tcp_get_peer_sock_name ...   Passed0.28 sec
  Start 12: test_echo_udp_sendto_recvfrom
12/25 Test #12: test_echo_udp_sendto_recvfrom ..   Passed0.23 sec
  Start 13: test_echo_udp_send_recv
13/25 Test #13: test_echo_udp_send_recv    Passed0.12 sec
  Start 14: test_echo_udp_sendmsg_recvmsg
14/25 Test #14: test_echo_udp_sendmsg_recvmsg ..   Passed0.28 sec
  Start 15: test_swrap_unit
15/25 Test #15: test_swrap_unit    Passed0.00 sec
  Start 16: test_max_sockets
16/25 Test #16: test_max_sockets ...   Passed0.01 sec
  Start 17: test_close_failure
17/25 Test #17: test_close_failure .   Passed0.03 sec
  Start 18: test_fork_thread_deadlock
18/25 Test #18: test_fork_thread_deadlock ..   Passed0.00 sec
  Start 19: test_tcp_socket_overwrite
19/25 Test #19: test_tcp_socket_overwrite ..   Passed0.03 sec
  Start 20: test_thread_sockets
20/25 Test #20: test_thread_sockets    Passed0.02 sec
  Start 21: test_thread_echo_tcp_connect
21/25 Test #21: test_thread_echo_tcp_connect ...***Failed0.07 sec
  Start 22: test_thread_echo_tcp_write_read
22/25 Test #22: test_thread_echo_tcp_write_read ***Failed0.07 sec
  Start 23: test_thread_echo_tcp_sendmsg_recvmsg
23/25 Test #23: test_thread_echo_tcp_sendmsg_recvmsg ...***Failed0.07 sec
  Start 24: test_thread_echo_udp_send_recv
24/25 Test #24: test_thread_echo_udp_send_recv .   Passed0.08 sec
  Start 25: test_sendmsg_recvmsg_fd
25/25 Test #25: test_sendmsg_recvmsg_fd    Passed0.00 sec

88% tests passed, 3 tests failed out of 25

Total Test time (real) =   2.54 sec

The following tests FAILED:
 21 - test_thread_echo_tcp_connect (Failed)
 22 - test_thread_echo_tcp_write_read (Failed)
 23 - test_thread_echo_tcp_sendmsg_recvmsg (Failed)
Errors while running CTest
*** Error code 8

Stop.
make: stopped in /root/build

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 .***Failed0.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

# echo $?
8

# uname -a
FreeBSD bazinga.localdomain 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri 
Jul 21 02:08:28 UTC
2017 r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

# cmake --version
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

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.

Note:- The failed test cases uses threads.

[1] https://git.cryptomilk.org/users/asn/socket_wrapper.git/log/?h=master-fix


Thanks,
Anoop C S.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/