test


Log

Author Commit Date CI Message
okhowang(王沛文) 028385f6 2020-05-28T17:14:46 fix build system and add test and cleanup code
Azat Khuzhin 90bcf2d6 2020-07-05T11:59:32 test: fix leak in dns/getaddrinfo_cancel_stress Some requests may get response (evutil_addrinfo) from gaic_server_cb, in case of cancel_event (10000ms) will not be fast enough.
Azat Khuzhin ba19b356 2020-07-05T11:45:56 test: fix UB in evbuffer/empty_reference_prepend_buffer UBSAN reports: test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:140:33: note: nonnull attribute specified here
Azat Khuzhin 7b9ba3b7 2020-07-05T11:14:18 test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc)
Azat Khuzhin e2f938c0 2020-07-05T11:08:05 test-closed: fix leak
Azat Khuzhin 0ac3cfc0 2020-06-26T10:35:44 test: add getaddrinfo(AI_ADDRCONFIG) test (off by default)
Azat Khuzhin ec94a6bb 2020-06-25T21:56:31 test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE) - http/https_filter_basic - http/https_filter_chunk_out
Azat Khuzhin cdbb2373 2020-06-25T21:40:40 test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks)
Azat Khuzhin 3b13a647 2020-06-25T21:25:51 test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky) And cannot be suppressed with suppressions due to setup routines.
Azat Khuzhin 6754740f 2020-06-25T21:01:53 test: detect test failures if atexit handler calls _exit(!0) (sanitizers) tinytest uses another way of detecting test failures, it uses pipe between child and parent, and if the test function in child returns OK it writes OK flag into pipe, and reads it in parent. However sanitizers uses atexit handlers to detect leaks, and this will not detect failures in case of exit() will be called from the atexit handlers, fix this by checking status after waitpid().
Azat Khuzhin a0c642ac 2020-06-25T10:15:01 buffer: do not pass NULL to memcpy() from evbuffer_pullup() UBSAN reports: evbuffer/remove_buffer_with_empty3: ../buffer.c:1443:3: runtime error: null pointer passed as argument 2, which is declared to never be null #0 0x7ffff6cd0410 in evbuffer_pullup ../buffer.c:1443 #1 0x5555556d68b9 in test_evbuffer_remove_buffer_with_empty3 ../test/regress_buffer.c:408 #2 0x5555557b95ee in testcase_run_bare_ ../test/tinytest.c:173 #3 0x5555557ba048 in testcase_run_one ../test/tinytest.c:333 #4 0x5555557bc0f8 in tinytest_main ../test/tinytest.c:527 #5 0x555555787702 in main ../test/regress_main.c:528 #6 0x7ffff606c001 in __libc_start_main (/usr/lib/libc.so.6+0x27001) #7 0x55555569436d in _start (/src/le/libevent/.cmake-debug/bin/regress+0x14036d)
Azat Khuzhin 6f152bef 2020-06-25T09:59:35 test: do not pass NULL to memcmp() in evbuffer_datacmp() helper Fixes: runtime error: null pointer passed as argument 2, which is declared to never be null
Azat Khuzhin 37dbb350 2020-06-25T08:45:34 http: fix undefined-shift in EVUTIL_IS*_ helpers evutil.c:2559:1: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' #0 0x4f2be0 in EVUTIL_ISXDIGIT_ libevent/evutil.c:2559:1 #1 0x4bd689 in regname_ok libevent/http.c:4838:7 #2 0x4bc16b in parse_authority libevent/http.c:4958:9 #3 0x4bb8b5 in evhttp_uri_parse_with_flags libevent/http.c:5103:7 #4 0x4bb762 in evhttp_uri_parse libevent/http.c:5050:9 #5 0x4b8f41 in evhttp_parse_query_impl libevent/http.c:3505:9 #6 0x4b8ed7 in evhttp_parse_query libevent/http.c:3569:9 Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23291 Report: https://oss-fuzz.com/testcase-detail/5670743106125824
Azat Khuzhin 2aaa7358 2020-06-02T10:12:20 test/regress_http: remove second ARRAY_SIZE macros
Azat Khuzhin 8b5a4d61 2020-06-02T10:01:31 test/regress_testutils: use inet_addr()
Azat Khuzhin 271c5aaa 2020-06-02T10:00:38 test/regress_dns: use tt_int_op() over tt_assert() in assert_request_results()
seleznevae 83c58d49 2020-05-31T19:59:49 evdns: Add support for setting maximum UDP DNS message size. Added new option `edns-udp-size` for evdns_base which allows to control maximum allowed size of UDP DNS messages. This maximum size is passed to the DNS server via edns mechanism.
Azat Khuzhin 7426a568 2020-05-25T11:25:18 http: Merge branch 'http-max_connections-pr-592' @jcoffland: "When the max connection limit is enabled and the limit is reached, the server will respond immediately with 503 Service Unavailable. This can be used to prevent servers from running out of file descriptors. This is better than request limiting because clients may make more than one request over a single connection. Blocking a request does not necessarily close the connection and free up a socket." * http-max_connections-pr-592: test: cover evhttp max connections Added evhttp max simultaneous connection limiting
Azat Khuzhin 95c1c200 2020-05-25T03:34:16 test: cover evhttp max connections
Azat Khuzhin 028842aa 2020-05-25T03:13:00 Merge branch 'evdns-tcp-pr-1004' @seleznevae: "Added support for DNS requests via TCP. By default, requests are done via UDP. In case truncated response is received new attempt is done via TCP connection. Added 2 new macros DNS_QUERY_USEVC and DNS_QUERY_IGNTC to force all requests to be done via TCP and to disable switch to TCP in case of truncated responses. Also added possibility for DNS server to listen and receive requests on TCP port. Current implementation of TCP support in DNS server seems rather preliminary and maybe changes after discussion and code review. Fallback to TCP in case of truncated DNS requests is done automatically. To imitate the old behaviour macros DNS_QUERY_IGNTC should be used. To force all DNS requests to be done via TCP one should use the flag DNS_QUERY_USEVC. Names DNS_QUERY_IGNTC, DNS_QUERY_USEVC were chosen to imitate similar flags in c-ares and glibc." Ok, interfaces looks good, merging to avoid stalling it for too long. * evdns-tcp-pr-1004: evdns: fix coding style issues evdns: fix trailing whitespaces evdns: bufferevent_setcb before bufferevent_free is redundant evdns: Implement dns requests via tcp
Azat Khuzhin e8c89510 2020-05-25T02:06:32 test: http/autofree_connection cleanup
ayuseleznev 0f6ee89a 2020-05-21T12:46:20 evdns: Implement dns requests via tcp
Azat Khuzhin 70f69194 2020-05-19T01:05:50 test: cleanup http/autofree_connection
Azat Khuzhin 1cc94fea 2020-05-19T00:52:01 test: fix http/autofree_connection Refs: #182
ayuseleznev 8fe35c76 2020-05-18T14:10:28 evdns: Add additional validation for values of dns options
Nick Grifka 83ef3216 2020-04-22T19:44:45 Add wepoll support to light up the epoll backend on Windows libevent is lacking a scalable backend on Windows. Let's leverage the wepoll library until Windows comes up with an epoll/kqueue compete user mode API. - All regress tests pass for standard wepoll - These 2 tests fail intermittently for changelist wepoll, so disabling changelist wepoll for now http/cancel_inactive_server http/stream_in - verify target on Windows runs tests for both wepoll and win32 backends - wepoll backend preferred over win32 backend - wepoll version 1.5.6 v2: cleaner backend abstraction. Disallow wepoll on MinGW/Cygwin. v3: Add wepoll.h to dist v4: Make sure wepoll source files are excluded from cygwin/mingw builds v5: Keep win32 as default backend on windows. v6: Include wepoll in mingw builds. Verified that regress tests pass w/ WEPOLL backend. v7: Enable wepoll on mingw when building with cmake v8: Add wepoll testrunner for autotools test target
Nick Grifka 06a11929 2020-05-07T21:14:13 test: Fix test_simpleclose for Windows platform Replace close with evutil_closesocket Caught with PR #1006
Azat Khuzhin 972b456b 2020-05-05T00:21:18 Fix EV_CLOSED detection/reporting (epoll only) - EV_CLOSED is EPOLLRDHUP in epoll - EPOLLRDHUP reported w/o EPOLLHUP if the socket closed with shutdown(SHUT_WR) - EPOLLRDHUP reported w/ EPOLLHUP if the socket closed with close() so in this case epoll backend will detect this event as error (EV_READ|EV_WRITE), since the epoll_ctl() will return EPOLLRDHUP with EPOLLHUP set, but this is not correct, let's fix this. Fixes: #984
Azat Khuzhin ecb67f61 2020-04-09T00:30:57 test: cover EV_CLOSED with lots of possible scenarious - trigger *RDHUP via close() <-- has issues - trigger *RDHUP via shutdown() - EV_CLOSED - EV_CLOSED|EV_PERSIST - EV_CLOSED|EV_ET <!-- has issues - EV_CLOSED|EV_ET|EV_PERSIST
Azat Khuzhin c81362b2 2020-04-09T00:14:26 test: rename simpleclose to simpleclose_rw (since it works via write/read)
Nick Grifka 5caffa7a 2020-04-16T12:08:02 bench: Allow backend method selection -l list available methods -m <name> use method
Azat Khuzhin 4e5a41ca 2020-03-01T15:47:40 test-time: do not use deprecated API - event_init() -> event_base_new() - event_set() -> event_new() - check return value of event_base_dispatch() - use EXIT_SUCCESS/EXIT_FAILURE
Azat Khuzhin a11edbfa 2020-03-01T14:54:36 test-time: enable debug mode if EVENT_DEBUG_LOGGING_ALL env set
ayuseleznev 4da9f87c 2020-02-27T16:59:45 evdns: fix a crash when evdns_base with waiting requests is freed Fix undefined behaviour and application crash that might take place in some rare cases after calling evdns_base_free when there are requests in the waiting queue. Current cleanup procedure in evdns_base_free_and_unlock function includes 2 steps: 1. Finish all inflight requests. 2. Finish all waiting requests. During the first step we iterate over each list in req_heads structure and finish all requests in these lists. With current logic finishing an inflight request (function request_finished) removes it from the inflight requests container and forces a wating connection to be sent (by calling evdns_requests_pump_waiting_queue). When these new requests are sent it is possible that they will be inserted to the list in req_heads that we've already cleaned. So in some cases container of the inflight requests is not empty after this procedure and some requests are not finished and deleted. When timeouts for these requests expire evdns_request_timeout_callback is called but corresponding evdns_base has been already deleted which causes undefined behaviour and possible applicaton crash. It is interesting to note that in old versions of libevent such situation was not possible. This bug was introduced by the commit 14f84bbdc77d90b1d936076661443cdbf516c593. Before this commit nameservers were deleted before finishing the requests. Therefore it was not possible that requests from the waiting queue be sent while we finish the inflight requests.
yuangongji 5fbe6313 2020-02-11T14:33:15 test-ratelim: add missing free
Azat Khuzhin f6d7992b 2020-01-23T21:34:18 test: mark common_timeout as retriable Refs: https://github.com/libevent/libevent/pull/951#issuecomment-576711224
Azat Khuzhin ca2b72c5 2020-01-14T21:45:01 test: move thread into realtime class even on EVENT__DISABLE_THREAD_SUPPORT
Azat Khuzhin d0adbc05 2020-01-14T10:20:12 test: fix compilation without thread support (EVENT__DISABLE_THREAD_SUPPORT=ON)
Azat Khuzhin 30fe1250 2020-01-14T02:14:16 test: fix bufferevent/bufferevent_connect_fail_eventcb* under osx/freebsd For OSX the socket should be closed, otherwise the "connection refused" will not be triggered. And freebsd can return error from the connect().
Azat Khuzhin 10504fca 2020-01-14T00:38:06 test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx) Fixes the following tests on osx: - del_wait - no_events Refs: #940
Azat Khuzhin 34d51e1b 2020-01-14T00:27:21 test: fix compilation under win32 (rearrange thread_setup() code)
Azat Khuzhin 391003e9 2020-01-14T00:41:48 test: use THREAD_* wrappers over pthread* in del_notify
Azat Khuzhin 4b72024b 2020-01-13T22:24:54 test: Use THREAD_* wrappers in del_notify/del_wait
Azat Khuzhin e6285eed 2020-01-13T22:24:54 test: move threads created with THREAD_START() to realtime scheduling class too
Azat Khuzhin b1e46c32 2020-01-13T00:33:39 test: put thread into real time scheduling class on osx for better latencies
nntrab 02905413 2016-02-09T18:01:00 Add callback support for error pages The existing error pages are very basic and don't allow for multi-lingual support or for conformity with other pages in a web site. The aim of the callback functionality is to allow custom error pages to be supported for calls to evhttp_send_error() by both calling applications and Libevent itself. A backward-incompatible change has been made to the title of error pages sent by evhttp_send_error(). The original version of the function used the reason argument as part of the title. That might have unforeseen side-effects if it contains HTML tags. Therefore the title has been changed to always use the standard status text. An example of the error callback can be found in this [version](https://github.com/libevent/libevent/files/123607/http-server.zip) of the 'http-server' sample. It will output error pages with very bright backgrounds, the error code using a very large font size and the reason. Closes: #323 (cherr-picked from PR)
Azat Khuzhin 08981f8d 2020-01-05T19:02:22 Fix compilation without OPENSSL_API_COMPAT Use the following for openssl 1.1+: - X509_getm_notBefore over X509_get_notBefore - X509_getm_notAfter over X509_get_notAfter - use OPENSSL_VERSION_NUMBER over SSLeay() - add missing headers Refs: openssl/openssl@0b7347effee5
Andre Pereira Azevedo Pinto f76456b0 2019-12-04T17:56:54 Add support for priority inheritance Add support for posix mutex priority inheritance. This is important to avoid priority inversion in systems running with threads with different priorities. Signed-off-by: Andre Azevedo <andre.azevedo@gmail.com>
Azat Khuzhin 8a348699 2019-11-17T18:13:51 test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive This can be/should be done for regression tests too. Refs: https://ci.appveyor.com/project/libevent/libevent/builds/28916689/job/kg621aa194a0qbym Refs: https://github.com/libevent/libevent/pull/917#issuecomment-553811834 v2: EVENT_BASE_FLAG_PRECISE_TIMER
Philip Homburg 9fecb59a 2019-10-29T15:48:53 Parse IPv6 scope IDs.
Azat Khuzhin 4436287d 2019-10-31T09:18:58 Relax bufferevent_connect_hostname_emfile Do not do any assumptions on the error for the EMFILE from getaddrinfo(), expect just any error. Fixes: #924
yuangongji 55d60c92 2019-10-18T21:11:37 test: add testcase for evutil_socketpair()
yuangongji 8d5c5650 2019-09-26T21:47:51 tinytest: support timeout on Windows
yuangongji 6769f692 2019-09-19T22:19:58 regress_buffer: improve testcase for evbuffer_freeze()
yuangongji 6f970267 2019-08-28T11:41:53 eliminate some C4267 warnings in Windows
Jan Kasiak 445027a5 2019-08-22T16:36:12 Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled Call event_debug_note_teardown_ before evcb_evfinalize to avoid possible UAF (if finalizer free's event).
Jan Kasiak 70daa93a 2019-08-27T01:00:56 test: prevent duplicate event_enable_debug_mode() for TT_ENABLE_DEBUG_MODE
Azat Khuzhin 6186d312 2019-08-26T22:43:35 test: introduce TT_ENABLE_DEBUG_MODE flag
dota17 9c151f3c 2019-08-06T18:19:15 Fix typos in comments (sample/test/event-internal.h)
Azat Khuzhin bdcade47 2019-07-31T10:34:38 buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM [ @azat: - add return heredoc for evbuffer_setcb() - add unit test with event_set_mem_functions() - look through the report from abi-compliance-checker/abi-dumper ] Closes: #855
Azat Khuzhin 538141eb 2019-06-15T23:18:05 evdns: add new options -- so-rcvbuf/so-sndbuf This will allow to customize SO_RCVBUF/SO_SNDBUF for nameservers in this evdns_base, you may want to adjust them if the kernel starts dropping udp packages.
Azat Khuzhin 51ac04ac 2019-05-25T17:29:25 test: mark bev_connect_hostname() as static (to avoid prototype requirement)
Azat Khuzhin 244cacaf 2019-05-16T09:42:41 test: regression for evbuffer_expand_fast_() with invalid last_with_datap Before the fix: $ regress --no-fork evbuffer/reserve_invalid_last_with_datap evbuffer/empty_chain_expand: [err] ../buffer.c:2138: Assertion chain == buf->first failed in evbuffer_expand_fast_ Aborted (core dumped) This is the a shorter version of test from the #806 (with some comments).
Azat Khuzhin 98ca3077 2019-05-16T09:50:43 test: cover adjusting of last_with_datap in evbuffer_prepend() Before the fix: $ regress evbuffer/empty_reference_prepend.. evbuffer/empty_reference_prepend: [forking] FAIL ../test/regress_buffer.c:104: assert(chain == buf->first) FAIL ../test/regress_buffer.c:2291: Buffer format invalid [empty_reference_prepend FAILED] evbuffer/empty_reference_prepend_buffer: [forking] OK 1/2 TESTS FAILED. (0 skipped)
Joseph Spadavecchia 5e137f37 2014-12-08T17:32:07 Implement bufferevent_socket_connect_hostname_hints() So that ai_flags (such as AI_ADDRCONFIG) can be specified. Closes: #193 (cherry-picked with conflicts resolved)
Tobias Stoeckmann 9b2060c9 2019-04-24T22:55:24 Added test for evmap slot validations. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Thomas Bernard 8dcb94a4 2016-01-08T13:36:20 Added http method extending User can define his own response method by calling evhttp_set_ext_method_cmp() on the struct http, or evhttp_connection_set_ext_method_cmp() on the connection. We expose a new stucture `evhttp_ext_method` which is passed to the callback if it's set. So any field can be modified, with some exceptions (in evhttp_method_): If the cmp function is set, it has the ability to modify method, and flags. Other fields will be ignored. Flags returned are OR'd with the current flags. Based on changes to the #282 from: Mark Ellzey <socket@gmail.com>
Dan Rosen 2f184f8b 2019-03-26T13:33:57 evwatch: Add "prepare" and "check" watchers. Adds two new callbacks: "prepare" watchers, which fire immediately before we poll for I/O, and "check" watchers, which fire immediately after we finish polling and before we process events. This allows other event loops to be embedded into libevent's, and enables certain performance monitoring. Closes: #710
Azat Khuzhin 47d348a6 2019-04-03T07:26:21 Disable logging for tests that assume printing warnings To avoid possible confusion But there is still one test that has some messages on windows: main/methods Because this test needs >1 of avaiable methods, otherwise it will warn.
Azat Khuzhin d4c75450 2019-03-25T11:13:03 Remove manually written nmake makefiles (cmake should be used instead) This nmake stuff is out dated, and nobody wants to support it anyway.
Azat Khuzhin e5b8f4c1 2019-04-01T01:47:00 evdns: add DNS_OPTION_NAMESERVERS_NO_DEFAULT/EVDNS_BASE_NAMESERVERS_NO_DEFAULT - DNS_OPTION_NAMESERVERS_NO_DEFAULT Do not "default" nameserver (i.e. "127.0.0.1:53") if there is no nameservers in resolv.conf, (iff DNS_OPTION_NAMESERVERS is set) - EVDNS_BASE_NAMESERVERS_NO_DEFAULT If EVDNS_BASE_INITIALIZE_NAMESERVERS isset, do not add default nameserver if there are no nameservers in resolv.conf (just set DNS_OPTION_NAMESERVERS_NO_DEFAULT internally) Fixes: #569
Azat Khuzhin 2ae875ed 2019-03-25T01:40:46 Link test/regress with event_core/event_extra over event Due to regress linked with event and event_core (both of them includes evthread.c) there will be two different evthread_id_fn_ variables under mingw64: evthread_id_fn_: &0x5294f20a8 evthread_id_fn_: &0x4ba0030a8 And because of this evthread_use_pthreads() can/will set one copy of variables while evthread*() functions will access another, which will break a lot of things (for example main/del_notify test). Fixes: #792
Azat Khuzhin 8a674243 2019-03-24T20:36:16 tinytest: fix parsing --timeout argument Fixes: 15b2f41d ("tinytest: implement per-test timeout (via alarm() under !win32 only)")
Azat Khuzhin 15b2f41d 2019-03-24T16:44:56 tinytest: implement per-test timeout (via alarm() under !win32 only)
Azat Khuzhin efcc1844 2019-03-16T16:52:05 bench: suppress int conversion warnings
Alexander Drozdov 68eb526d 2019-03-13T10:51:55 http: add WebDAV methods support WebDAV introduced new HTTP methods (RFC4918): PROPFIND, PROPPATCH, MKCOL, LOCK, UNLOCK, COPY, MOVE. Add support of the methods.
Azat Khuzhin 5ee507c8 2019-03-04T06:53:42 http: implement separate timeouts for read/write/connect phase This patch allows to change timeout for next events read/write/connect separatelly, using new API: - client: evhttp_connection_set_connect_timeout_tv() -- for connect evhttp_connection_set_read_timeout_tv() -- for read evhttp_connection_set_write_timeout_tv() -- for write - server: evhttp_set_read_timeout_tv() -- for read evhttp_set_write_timeout_tv() -- for write It also changes a logic a little, before there was next fallbacks which does not handled in new API: - HTTP_CONNECT_TIMEOUT - HTTP_WRITE_TIMEOUT - HTTP_READ_TIMEOUT And introduce another internal flag (EVHTTP_CON_TIMEOUT_ADJUSTED) that will be used in evrpc, which adjust evhttp_connection timeout only if it is not default. Fixes: #692 Fixes: #715
John Ohl 62df1301 2014-12-09T21:43:18 Add support for EV_TIMEOUT to event_base_active_by_fd Closes: #194 (cherry-pick)
Azat Khuzhin 5b19c9f6 2019-03-03T16:29:52 buffer: do not rely on ->off in advance_last_with_data() advance_last_with_data() adjusts evbuffer.last_with_datap, and if we will have empty chain in the middle advance_last_with_data() will stop, while it should not, since while empty chains is not regular thing they can pops up in various places like, and while I did not look through all of them the most tricky I would say is: evbuffer_reverse_space()/evbuffer_commit_space() evbuffer_add_reference() Test case from: https://github.com/envoyproxy/envoy/pull/6062 Fixes: #778 v2: keep last_with_datap really last with data, i.e. update only if chain has data in it
Azat Khuzhin fdfabbec 2019-03-02T22:50:00 buffer: fix evbuffer_remove_buffer() with empty chain in front In case we have empty chain (chain that do not have any data, i.e. ->off == 0) at the beginning of the buffer, and no more full chains to move to the dst, we will skip moving of this empty chain, and hence last_with_datap will not be adjusted, and things will be broken after. Fix this by not relying on ->off, just count if we have something to move that's it. Test case from: https://github.com/envoyproxy/envoy/pull/6062 Fixes: #774
Azat Khuzhin 91acedcc 2019-03-03T17:43:37 test: verify content of the buffer in evbuffer/remove_buffer_with_empty* And replace spaces with tab in remove_buffer_with_empty
Azat Khuzhin 14eb903b 2019-02-24T17:25:31 Revert "test: avoid regress hanging in macOS" After we started to use kill() over raise() everything should work just fine. This reverts commit a86f89d333d870e6714bd28c695ba1774df3d7f5. Fixed-in: 728c5dc1 ("Use kill() over raise() for raising the signal (fixes osx 10.14 with kqueue)") Fixes: #747
Azat Khuzhin 728c5dc1 2019-02-24T17:07:18 Use kill() over raise() for raising the signal (fixes osx 10.14 with kqueue) On OSX 10.14+ the raise() uses pthread_kill() (verified with dtruss) and by some reason signals that has been raised with pthread_kill() do not received by kqueue EVFILT_SIGNAL. While on OSX 10.11 the raise()/pthread_kill() uses plain kill() and everything work just fine (linux also does the same, but instead of kill() it uses tgkill()) Here is a simple reproducer that installs alarm to show that the signal does not received by the kqueue backend: https://gist.github.com/azat/73638b8e3b0fa563a20dadcca9e652a1 Refs: #747 Fixes: #765
Azat Khuzhin 6dbad0f6 2019-02-04T22:34:10 test/dns: in solaris under EMFILE devpoll does not dispatch (due DP_POLL failure)
Azat Khuzhin d234902d 2019-02-03T18:54:00 test/dns: in solaris under EMFILE the error is EAI_FAIL
Azat Khuzhin ae9b285d 2019-02-03T18:47:14 test/ssl/bufferevent_wm: explicitly break the loop once client/server received enough There can be tricky cases (that can be reproduced by reducing SO_RCVBUF/SO_SNDBUF to 6144, on linux, and be aware, since linux doubles this const), when there is still write event pending, although we read enough. This should be fixed in a more sophisticated way, but to backport the patch, let's simply break the loop manually. The ssl/bufferevent_wm originally failed on solaris.
Azat Khuzhin b29207dc 2019-01-29T21:12:33 Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET (windows) windows has intptr_t instead of regular int. Also tt_fd_op() had been introduced, since we cannot use tt_int_op() for comparing fd, since it is not always int.
Azat Khuzhin 0791a172 2019-01-29T21:06:37 test/et/et: use evutil_socket_t* over int* for pointer to the pair Next code will not work correctly under win x64: evutil_socket_t very_long_pair_name[2]; int *pair = very_long_pair_name; // <-- accessing the second word of the first element Because sizeof(evutil_socket_t) == sizeof(intptr_t) == 8 P.S. in the 5334762f another test had been fixed instead of the one that really fails. Fixes: 5334762f ("test/et/et: fix it by using appropriate type for the SOCKET (evutil_socket_t)") Refs: #750
Azat Khuzhin 5334762f 2019-01-29T10:42:50 test/et/et: fix it by using appropriate type for the SOCKET (evutil_socket_t) Fixes: #750
Azat Khuzhin 3e37fcd4 2019-01-29T01:44:33 test/et/et: verify return codes
Azat Khuzhin b8ca5a68 2019-01-27T15:28:28 test: add logging for http/read_on_write_error and rearrange code
Azat Khuzhin 4ffc7116 2019-01-26T18:52:33 test: adjust expecting error for getaddrinfo() under EMFILE When getaddrinfo() cannot allocate file descriptor glibc/musl-libc on linux report EAI_SYSTEM error. But this is not true for freebsd libc [1] (and hence apple libc [2]), they report EAI_NONAME error instead, so adjust expectation. [1]: https://github.com/freebsd/freebsd/blob/master/lib/libc/net/getaddrinfo.c [2]: https://opensource.apple.com/source/Libc/ Refs: #749 Refs: https://github.com/libevent/libevent/issues/749#issuecomment-457838159
Azat Khuzhin 91a2f134 2019-01-12T13:58:50 test/nonpersist_readd: use assert helpers To debug failure under win32 in appveyor: https://ci.appveyor.com/project/nmathewson/libevent/builds/21559140/job/dn16qdo1j6sr497t#L1620
Azat Khuzhin e5ec52d1 2018-12-08T17:35:53 test-fdleak: fix memory leaks Fixes: #726
Azat Khuzhin 1d2ef900 2018-11-23T00:42:46 test: add TT_RETRIABLE for http/cancel_by_host_no_ns Could fail from time to time in travis-ci: https://travis-ci.org/libevent/libevent/jobs/458554097#L1702 Follow-up-for: fe5b0719 ("Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only)")
Azat Khuzhin fe5b0719 2018-11-20T11:46:44 Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only) This patch mark testcases that only fail under travis-ci/appveyor with TT_RETRIABLE, since otherwise there is too much noise, other issues (like failures under vagrant boxes) would be investigated separatelly. linux (from travis-ci only): - http/cancel_by_host_no_ns - http/cancel_by_host_inactive_server - http/cancel_by_host_ns_timeout - http/cancel_by_host_ns_timeout_inactive_server - thread/conditions_simple - util/monotonic_prc_precise - util/usleep - main/del_wait vagrant/ubuntu box (this is the only exception): - thread/no_events win32 (from appveyor only): - main/active_later - main/persistent_active_timeout And we should use TT_RETRIABLE over TT_OFF_BY_DEFAULT/TT_SKIP when it make sense. But there is still "test-ratelim__group_lim" left.
Azat Khuzhin 63b065be 2018-11-20T01:06:04 regress: introduce TT_RETRIABLE We have some tests that has false-positive due to real/CPU time bound, but they are pretty generic and we do not want to skip them by default. TT_RETRIABLE is the flag that will indicate tinytest to retry the test in case of failure, use it to avoid next possible false-positives: - real time-related - CPU time-related Since I guess it is better to see/grepping RETRYING messages over ignoring completely failed builds. No configuration switch for number of retries was done on purpose (only 3 retries and no more). And this is how it looks BTW: $ gcc ../test/tinytest_demo.c ../test/tinytest.c $ ./a.out --verbose --no-fork demo/timeout_retry demo/timeout_retry: FAIL ../test/tinytest_demo.c:201: assert(i != 1): 1 vs 1 [timeout_retry FAILED] [RETRYING timeout_retry (3)] demo/timeout_retry: OK ../test/tinytest_demo.c:201: assert(i != 1): 2 vs 1 OK ../test/tinytest_demo.c:213: assert(t2-t1 >= 4): 5 vs 4 OK ../test/tinytest_demo.c:215: assert(t2-t1 <= 6): 5 vs 6 1 tests ok. (0 skipped)
Azat Khuzhin 3036f15a 2018-11-20T06:20:51 regress_http: fix compilation with !EVENT__HAVE_OPENSSL Fixes: 811c63f7 ("regress: test for HTTP/HTTPS with IOCP enabled")
Azat Khuzhin f8d510f6 2018-11-13T23:20:10 regress_bufferevent: add TT_IOCP_LEGACY/TT_IOCP
Azat Khuzhin 903c6ace 2018-11-13T23:30:51 t/bench_http: disable buffering (win32 do not show anything otherwise) Refs: #255