libest icon indicating copy to clipboard operation
libest copied to clipboard

Self-test failures on FreeBSD

Open hitched97 opened this issue 8 years ago • 5 comments

I've successfully built libest on FreeBSD 11.0 using clang 3.8.0, with this change (needed to get sockaddr_in):

--- src/est/est_client_proxy.c.orig     2017-03-27 16:36:25 UTC
+++ src/est/est_client_proxy.c
@@ -26,6 +26,7 @@
 #   include <unistd.h>
 #   include <arpa/inet.h>
 #endif /* WIN32 */
+#include <netinet/in.h>
 #include <errno.h>
 #include <string.h>
 #include <fcntl.h>

However, running the self test leads to these failures:

Here is a summary of the failed test cases:

  1. US899/us899.c:393  - rv == expected_enroll_rv
  2. US899/us899.c:399  - rv == expected_enroll_rv
  3. US899/us899.c:393  - rv == expected_enroll_rv
  4. US899/us899.c:399  - rv == expected_enroll_rv
  5. US899/us899.c:393  - rv == expected_enroll_rv
  6. US899/us899.c:399  - rv == expected_enroll_rv
  7. US899/us899.c:393  - rv == expected_enroll_rv
  8. US899/us899.c:399  - rv == expected_enroll_rv
  9. US899/us899.c:393  - rv == expected_enroll_rv
  10. US899/us899.c:399  - rv == expected_enroll_rv
  11. US899/us899.c:393  - rv == expected_enroll_rv
  12. US899/us899.c:399  - rv == expected_enroll_rv

Here is the complete self-test output libest.test.txt

I would appreciate assistance in debugging and fixing these.

hitched97 avatar Aug 15 '17 12:08 hitched97

Hi,

This is good information. We've not tested on FreeBSD before. At the moment, we're in the middle of an internal release. Once this is complete, we'll set up a FreeBSD test system and investigate.

Normally, we make a release to Github about a month after our six month internal feature release. However, we're currently holding off on this release until November in order to focus on a high priority feature that needs to be complete in November. Once we get this feature completed we'll be releasing a new version of libEST here in Github. In the meantime, we'll be pulling most of the fixes provided in other PRs very shortly.

A quick look at the failures you're reporting indicates that it has something to do with the hostname being used in 6 of the tests

***EST [INFO][tcw_direct_connect:148]--> getaddrinfo(localhost.cisco.com, 29899) ***EST [ERROR][tcw_direct_connect:150]--> getaddrinfo returned 8: hostname nor servname provided, or not known ***EST [ERROR][est_client_connect:2458]--> Unable to lookup hostname localhost.cisco.com. ***EST [INFO][tcw_direct_connect:148]--> getaddrinfo(localhost.cisco.com, 29899) ***EST [ERROR][tcw_direct_connect:150]--> getaddrinfo returned 8: hostname nor servname provided, or not known ***EST [ERROR][est_client_connect:2458]--> Unable to lookup hostname localhost.cisco.com. FAILED 1. US899/us899.c:393 - rv == expected_enroll_rv 2. US899/us899.c:399 - rv == expected_enroll_rv

Seems like if the ".cisco.com" part was causing the problem then it would be happening all the time and this does not seem to happen for others users of libEST on Linux based systems. Once we get past this internal release we'll investigate these failures in FreeBSD.

Regards RPB

rpb5bnc avatar Aug 15 '17 18:08 rpb5bnc

Forgot to mention, I also commented out the call to tdestroy() in st_server.c and the -ldl in UT/Makefile - they don't exists on FreeBSD,

hitched97 avatar Aug 16 '17 13:08 hitched97

Ok, thanks for the update.

rpb5bnc avatar Aug 16 '17 13:08 rpb5bnc

I got through the tests by adding "127.0.0.1 localhost.cisco.com" to my /etc/hosts file. I'd suggest a comment in test/README about this, but other than that, I can consider this a non-issue. I can submit a pull request with my changes if you like.

hitched97 avatar Aug 16 '17 19:08 hitched97

Yes, that would be good. Thanks.

rpb5bnc avatar Aug 16 '17 19:08 rpb5bnc