<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le lun. 9 juil. 2018 à 07:14, Anoop C S <<a href="mailto:anoopcs@autistici.org">anoopcs@autistici.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
While running tests from a wip branch[1] for socket_wrapper project I noticed the following output<br>
on FreeBSD:<br><br></blockquote><div><br></div><div>Your issue seems more related with the "socker wrapper" project than with CMake/CTest but... </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Following that I ran one among the failed tests from the above list using `ctest`:<br>
<br>
# ctest -R test_thread_echo_tcp_connect<br>
Test project /root/build<br>
Start 21: test_thread_echo_tcp_connect<br>
1/1 Test #21: test_thread_echo_tcp_connect .....***Failed 0.07 sec<br>
<br>
0% tests passed, 1 tests failed out of 1<br>
<br>
Total Test time (real) = 0.07 sec<br>
<br>
The following tests FAILED:<br>
21 - test_thread_echo_tcp_connect (Failed)<br>
Errors while running CTest<br></blockquote><div><br></div><div>If you want to have more verbose output from ctest you an run:</div><div><br></div><div>ctest -R test_thread_echo_tcp_connect -VV<br></div><div><br></div><div>and ctest will spit out whatever output "<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">test_thread_echo_tcp_connect" is giving.</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">otherwise did you try to run the test "manually" without ctest:</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">from <a href="https://git.cryptomilk.org/users/asn/socket_wrapper.git/tree/tests/CMakeLists.txt?h=master-fix">https://git.cryptomilk.org/users/asn/socket_wrapper.git/tree/tests/CMakeLists.txt?h=master-fix</a></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">it looks like the test executable is:</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">test_thread_echo_tcp_connect<br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">so try running:</span></div><div><br></div><div>./test_thread_echo_tcp_connect </div><div><br></div><div>and whether it fails or not.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
# uname -a<br>
FreeBSD bazinga.localdomain 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC<br>
2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64<br><br></blockquote><div><br></div><div>You seem to be compiling and running your tests as 'root' user. This is usually not a good idea</div><div>(even if it may not have anything to do with your failure).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I couldn't see any genuine errors from the test logs as such. Am I missing something? Since I am a<br>
newbie to FreeBSD(and also to cmake) I would require some help to debug the reason for ENOEXEC exit<br>
code.<br></blockquote><div><br></div><div>Try running in verbose mode, you may even debug into the test if you run the test without ctest.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Note:- The failed test cases uses threads.<br>
[1] <a href="https://git.cryptomilk.org/users/asn/socket_wrapper.git/log/?h=master-fix" rel="noreferrer" target="_blank">https://git.cryptomilk.org/users/asn/socket_wrapper.git/log/?h=master-fix</a><br><br></blockquote><div><br></div><div>Then I suggest you ask on the project mailing list what may make this test fail.</div><div> </div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>