libest
libest copied to clipboard
Self-test failures on FreeBSD
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.
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
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,
Ok, thanks for the update.
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.
Yes, that would be good. Thanks.