I get the following test failures on Solaris 9 w/ Sun Studio 12:
cd test && make verify
Running tests:
KQUEUE
Skipping test
DEVPOLL
-n test-eof:
OKAY
-n test-weof:
OKAY
-n test-time:
OKAY
-n regress:
[warn] event_base_new_with_config: no event mechanism available
FAILED
POLL
-n test-eof:
OKAY
-n test-weof:
OKAY
-n test-time:
OKAY
-n regress:
[warn] event_base_new_with_config: no event mechanism available
FAILED
SELECT
-n test-eof:
OKAY
-n test-weof:
OKAY
-n test-time:
OKAY
-n regress:
[warn] event_base_new_with_config: no event mechanism available
FAILED
EPOLL
Skipping test
EVPORT
Skipping test
Is there some kind of verbose output or a log I can attach?
Run ./test/regress, and see what the real error is?
Also, remember to say which version of Libevent exactly this is. :)
This is libevent 2.0.4-alpha.
The test is run on Solaris 9 Sparc w/Sun Studio 12.
current9s% ./test/regress
main/methods: [forking] OK
main/version: OK
main/base_features: [forking] OK
main/base_environ: [forking] [warn] event_base_new_with_config: no event mechanism available
FAIL regress.c:1805: assert(base)
[base_environ FAILED]
main/event_base_new: [forking] OK
main/free_active_base: [forking] OK
main/manipulate_active_events: [forking] OK
main/bad_assign: [forking] OK
main/persistent_timeout: [forking] OK
main/persistent_active_timeout: [forking] OK
main/priorities: [forking] OK
main/common_timeout: [forking] OK
main/simpleread: [forking] OK
main/simpleread_multiple: [forking] OK
main/simplewrite: [forking] OK
main/multiple: [forking] OK
main/persistent: [forking] OK
main/combined: [forking] OK
main/simpletimeout: [forking] OK
main/loopbreak: [forking] OK
main/loopexit: [forking] OK
main/loopexit_multiple: [forking] OK
main/nonpersist_readd: [forking] OK
main/multiple_events_for_same_fd: [forking] OK
main/want_only_once: [forking] OK
main/event_once: [forking] OK
main/event_pending: [forking] OK
main/mm_functions: [forking] OK
main/many_events: [forking] OK
main/fork: [forking] OK
heap/randomized: OK
et/et: [forking] OK
evbuffer/evbuffer: OK
evbuffer/reserve2: OK
evbuffer/reference: OK
evbuffer/iterative: OK
evbuffer/readln: OK
evbuffer/find: OK
evbuffer/ptr_set: OK
evbuffer/search: OK
evbuffer/callbacks: OK
evbuffer/add_reference: OK
evbuffer/prepend: OK
evbuffer/peek: OK
evbuffer/freeze_start: OK
evbuffer/freeze_end: OK
evbuffer/add_file: OK
signal/simplesignal: [forking] OK
signal/multiplesignal: [forking] OK
signal/immediatesignal: [forking] Immediate signal: OK
signal/signal_dealloc: [forking] Signal dealloc: OK
signal/signal_pipeloss: [forking] Signal pipeloss: OK
signal/signal_switchbase: [forking] Signal switchbase: OK
signal/signal_restore: [forking] Signal handler restore: OK
signal/signal_assert: [forking] Signal handler assert: OK
signal/signal_while_processing: [forking] OK
util/ipv4_parse: OK
util/ipv6_parse: OK
util/sockaddr_port_parse: OK
util/sockaddr_predicates: OK
util/evutil_snprintf: OK
util/evutil_strtoll: OK
util/evutil_casecmp: OK
util/strlcpy: OK
util/log: [forking] OK
util/upcast: OK
util/integers: OK
util/rand: [forking] OK
util/getaddrinfo: [forking]
FAIL regress_util.c:671: assert(ai->ai_protocol == protocol): 0 vs 6
FAIL regress_util.c:711: Test failed on line 786
[getaddrinfo FAILED]
bufferevent/bufferevent: [forking] OK
bufferevent/bufferevent_pair: [forking] OK
bufferevent/bufferevent_watermarks: [forking] OK
bufferevent/bufferevent_pair_watermarks: [forking] OK
bufferevent/bufferevent_filters: [forking] OK
bufferevent/bufferevent_pair_filters: [forking] OK
bufferevent/bufferevent_connect: [forking] OK
bufferevent/bufferevent_connect_defer: [forking] OK
bufferevent/bufferevent_connect_lock: [forking] OK
bufferevent/bufferevent_connect_lock_defer: [forking] OK
bufferevent/bufferevent_connect_fail: [forking] OK
bufferevent/bufferevent_timeout: [forking] OK
bufferevent/bufferevent_timeout_pair: [forking] OK
bufferevent/bufferevent_timeout_filter: [forking] OK
bufferevent/bufferevent_timeout_filter_pair: [forking] OK
bufferevent/bufferevent_zlib: [forking] OK
http/primitives: OK
http/base: [forking] OK
http/bad_headers: OK
http/parse_query: OK
http/basic: [forking] OK
http/cancel: [forking] OK
http/virtual_host: [forking] OK
http/post: [forking] OK
http/put: [forking] OK
http/delete: [forking] OK
http/failure: [forking] OK
http/connection: [forking] OK
http/persist_connection: [forking] OK
http/connection_async: [forking] OK
http/close_detection: [forking] OK
http/close_detection_delay: [forking] OK
http/bad_request: [forking] OK
http/incomplete: [forking] OK
http/incomplete_timeout: [forking] OK
http/terminate_chunked: [forking] OK
http/highport: [forking] OK
http/dispatcher: [forking] OK
http/multi_line_header: [forking] OK
http/negative_content_length: [forking] OK
http/chunk_out: [forking] OK
http/stream_out: [forking] OK
http/stream_in: [forking] OK
http/stream_in_cancel: [forking] OK
http/connection_retry: [forking] OK
http/data_length_constraints: [forking] OK
dns/server: [forking] OK
dns/gethostbyname: [forking] OK
dns/gethostbyname6: [forking] OK
dns/gethostbyaddr: [forking] OK
dns/resolve_reverse: [forking] OK
dns/search: [forking] OK
dns/retry: [forking] OK
dns/reissue: [forking] OK
dns/inflight: [forking] OK
dns/bufferevent_connect_hostname: [forking] OK
dns/getaddrinfo_async: [forking] OK
evtag/int: [forking] OK
evtag/fuzz: [forking] OK
evtag/encoding: [forking] OK
evtag/peek: OK
rpc/basic_test: [forking] OK
rpc/basic_message: [forking] OK
rpc/basic_client: [forking] OK
rpc/basic_queued_client: [forking] OK
rpc/basic_client_with_pause: [forking] OK
rpc/client_timeout: [forking] OK
rpc/test: [forking] OK
thread/pthreads: [forking] OK
listener/randport: [forking] OK
ssl/bufferevent_socketpair: [forking] OK
ssl/bufferevent_filter: [forking] OK
ssl/bufferevent_renegotiate_socketpair: [forking] OK
ssl/bufferevent_renegotiate_filter: [forking] OK
ssl/bufferevent_connect: [forking] OK
2/144 TESTS FAILED. (0 skipped)
Interesting: looks like your Solaris getaddrinfo() doesn't set addrinfo.ai_protocol, even when it can infer it from ai_socktype.
We should try to confirm this before we go charging in to apply a fix. If you have python installed, could you run:
% python -c 'import socket; print socket.getaddrinfo("1.2.3.4", "80", socket.AF_INET, socket.SOCK_STREAM)'
and let me know what it says?
(If you don't have Python, let me know,and I'll try to come up with a test program in C.)
Hi,
it looks list this;
current9s% python -c 'import socket; print socket.getaddrinfo("1.2.3.4", "80", socket.AF_INET, socket.SOCK_STREAM)'
[(2, 2, 0, '', ('1.2.3.4', 80))]
If it helps I can give you account on the OpenCSW buildfarm to regularly test for Solaris compilability.
Best regards -- Dago
Possible fix for getaddrinfo-related portion of bug
I've attached a patch that might fix the getaddrinfo-related portion of this bug. Please let me know if it works.
As for the main/base_environ failure, I suspect that it might be a bad implementation of unsetenv; I'm attaching a patch for that too; it would be neat to know whether it works.
possible fix for unit tests if unsetenv is broken
Hi! We want to put out a beta release soon. Can you tell us whether the patches I attached work or not?
The patch for the "base_environ" test works:
main/base_environ: [forking]
NOTE regress.c:1802: Can't fake unsetenv; skipping testSKIPPED
However, the other patch does not seem to have an effect:
util/getaddrinfo: [forking]
FAIL regress_util.c:671: assert(ai->ai_protocol == protocol): 0 vs 6
FAIL regress_util.c:711: Test failed on line 786
[getaddrinfo FAILED]
Okay, I'll apply the base_environ test patch.
I'm not sure what's going wrong with the other one. If you get a chance to use gdb to investigate, it would be neat to know: 1) whether need_socktype_protocol_hack_ does indeed get set, and 2) if so, whether evutil_getaddrinfo_infer_protocols indeed gets called in the failing invocation of evutil_getaddrinfo().
So after a bunch of punching and kicking, I managed to get an opensolaris vm running under virtualbox. It looks like the )*&&*%$ thing actually believes that it shouldn't set the ai_ipproto field in the result _even when it is set in the hints_. This is definitely not what my reading of RFC3493 suggests.
It looks like there's at least one more getaddrinfo() incompatibility too, where it leaves the protocol and socktype fields unset rather than filling them in if they are both unspecified.
Okay; it seems to work for me now. Should be fixed in 2.0.5-beta.