|
51ac04ac
|
2019-05-25T17:29:25
|
|
test: mark bev_connect_hostname() as static (to avoid prototype requirement)
|
|
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).
|
|
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)
|
|
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)
|
|
9b2060c9
|
2019-04-24T22:55:24
|
|
Added test for evmap slot validations.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
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>
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
8a674243
|
2019-03-24T20:36:16
|
|
tinytest: fix parsing --timeout argument
Fixes: 15b2f41d ("tinytest: implement per-test timeout (via alarm() under !win32 only)")
|
|
15b2f41d
|
2019-03-24T16:44:56
|
|
tinytest: implement per-test timeout (via alarm() under !win32 only)
|
|
efcc1844
|
2019-03-16T16:52:05
|
|
bench: suppress int conversion warnings
|
|
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.
|
|
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
|
|
62df1301
|
2014-12-09T21:43:18
|
|
Add support for EV_TIMEOUT to event_base_active_by_fd
Closes: #194 (cherry-pick)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
6dbad0f6
|
2019-02-04T22:34:10
|
|
test/dns: in solaris under EMFILE devpoll does not dispatch (due DP_POLL failure)
|
|
d234902d
|
2019-02-03T18:54:00
|
|
test/dns: in solaris under EMFILE the error is EAI_FAIL
|
|
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.
|
|
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.
|
|
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
|
|
5334762f
|
2019-01-29T10:42:50
|
|
test/et/et: fix it by using appropriate type for the SOCKET (evutil_socket_t)
Fixes: #750
|
|
3e37fcd4
|
2019-01-29T01:44:33
|
|
test/et/et: verify return codes
|
|
b8ca5a68
|
2019-01-27T15:28:28
|
|
test: add logging for http/read_on_write_error and rearrange code
|
|
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
|
|
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
|
|
e5ec52d1
|
2018-12-08T17:35:53
|
|
test-fdleak: fix memory leaks
Fixes: #726
|
|
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)")
|
|
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.
|
|
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)
|
|
3036f15a
|
2018-11-20T06:20:51
|
|
regress_http: fix compilation with !EVENT__HAVE_OPENSSL
Fixes: 811c63f7 ("regress: test for HTTP/HTTPS with IOCP enabled")
|
|
f8d510f6
|
2018-11-13T23:20:10
|
|
regress_bufferevent: add TT_IOCP_LEGACY/TT_IOCP
|
|
903c6ace
|
2018-11-13T23:30:51
|
|
t/bench_http: disable buffering (win32 do not show anything otherwise)
Refs: #255
|
|
811c63f7
|
2018-11-13T11:25:35
|
|
regress: test for HTTP/HTTPS with IOCP enabled
Next tests added:
- iocp/http/simple
- iocp/http/https_simple
|
|
b2d4fb41
|
2018-11-13T09:25:13
|
|
regress: add EVENT_NO_FILE_BUFFERING, to disable buffering for stdout/stderr
Useful for win32
|
|
1fc1c7ef
|
2018-11-08T00:36:07
|
|
regress_ssl: fix ssl/bufferevent_wm_filter for non defered callbacks
Even after referenced patch there is still possible recursive callbacks
from evbuffer_drain(bev_input), i.e.:
wm_transfer() -> evbuffer_drain() -> wm_transfer()
inc(ctx->get)
But if we will increment ctx->get before drain that we will not add more
data to buffer.
Refs: 54c6fe3c ("regress_ssl: make ssl/bufferevent_wm_filter more fault-tolerance")
CI: https://ci.appveyor.com/project/nmathewson/libevent/build/job/f0rv299i71wnuxdq#L2546
|
|
54c6fe3c
|
2018-11-05T22:25:15
|
|
regress_ssl: make ssl/bufferevent_wm_filter more fault-tolerance
Due to inplace callbacks (i.e. no BEV_OPT_DEFER_CALLBACKS) we cannot be
sure that wm_transfer() will not be called recursively and indeed it
still happens sometimes, and the referenced patch increase amount of
this times, especially for linux/poll.
Fixes: 66304a23cf748714159c988e78f35401c5352827 ("Fix
ssl/bufferevent_wm_filter when bev does not reach watermark on break")
|
|
9040707f
|
2018-11-05T21:33:54
|
|
regress_http: disable http/read_on_write_error under win32
EVHTTP_CON_READ_ON_WRITE_ERROR works only if an error already read from
the socket, but if we already got EPIPE on write we cannot read from the
socket anymore, and win32 does not guarantee that read will happens
before (although it happens from time to time).
In the referenced patch I just replaced callback with not expecting 417,
but like I already wrote, this is not always true (i.e. it is flacky).
Fixes: 3b581693ac1967f7f8d98491cb772a1b415eb4cd ("test/http:
read_on_write_error: fix it for win32")
|
|
66304a23
|
2018-11-04T20:40:04
|
|
Fix ssl/bufferevent_wm_filter when bev does not reach watermark on break
For the ssl/bufferevent_wm* we have next configuration:
- payload_len = 1024
- wm_high = 5120
- limit = 40960
- to_read = 512
In this test we expect that with high watermark installed to "wm_high"
we will read "limit" bytes by reading "to_read" at a time, but adding
"payload_len" at a time (this "to_read"/"payload_len" limits is
installed to finally overflow watermark).
Once we read "limit" bytes we break, by disable EV_READ and reset
callbacks. Although this will not work if when we want to break we do
not reach watermark, this is because watermarks installs evbuffer
callback for the input buffer and if the watermark does not reached it
will enable EV_READ while be_openssl_enable() will read from the
underlying buffer (in case the openssl bufferevent created via
bufferevent_openssl_filter_new()) and call callback again (until it will
reach watermark or read al from the underlying buffer -- this is why it
stops in our caes).
And this is exactly what happened in win32, you can see this in the
following logs:
- win32 before:
OK C:\vagrant\test\regress_ssl.c:829: wm_transfer-client(00DC2750): in: 4608, out: 0, got: 40960
OK C:\vagrant\test\regress_ssl.c:834: wm_transfer-client(00DC2750): break
OK C:\vagrant\test\regress_ssl.c:829: wm_transfer-client(00DC2750): in: 4608, out: 0, got: 41472
OK C:\vagrant\test\regress_ssl.c:834: wm_transfer-client(00DC2750): break
OK C:\vagrant\test\regress_ssl.c:829: wm_transfer-client(00DC2750): in: 4608, out: 0, got: 41984
OK C:\vagrant\test\regress_ssl.c:834: wm_transfer-client(00DC2750): break
OK C:\vagrant\test\regress_ssl.c:829: wm_transfer-client(00DC2750): in: 4608, out: 0, got: 42496
OK C:\vagrant\test\regress_ssl.c:834: wm_transfer-client(00DC2750): break
- win32 after:
OK C:\vagrant\test\regress_ssl.c:821: wm_transfer-client(00FC26F0): break
OK C:\vagrant\test\regress_ssl.c:836: wm_transfer-client(00FC26F0): in: 4800, out: 0, got: 40960
- linux before:
OK ../test/regress_ssl.c:829: wm_transfer-client(0x55555566f5e0): in: 5120, out: 0, got: 40960
OK ../test/regress_ssl.c:834: wm_transfer-client(0x55555566f5e0): break
- linux after:
OK ../test/regress_ssl.c:821: wm_transfer-client(0x55555566f5e0): break
OK ../test/regress_ssl.c:836: wm_transfer-client(0x55555566f5e0): in: 5120, out: 0, got: 40960
(As you can see in linux case we already reach watermark hence it passed
before).
So fix the issue by breaking before draining.
But during fixing this I was thinking is this right? I.e. reading from
the be_openssl_enable(), maybe we should force deferred callbacks at
least?
|
|
e8c407e7
|
2018-11-04T20:15:14
|
|
regress_ssl: cover watermarks with deferred callbacks
|
|
fb7f43f0
|
2018-11-04T20:03:50
|
|
regress_ssl: improve bufferevent_wm/bufferevent_wm_filter logging
- add bev pointer
- use EV_SIZE_FMT over %zu (win32)
|
|
e29afd4b
|
2018-11-02T23:43:57
|
|
regress_http: make https_basic non time dependent
Fixes: #454
|
|
4cbdb39c
|
2018-11-04T00:59:33
|
|
regress: use non blocking descriptors whenever it is possible
Next tests uses fds without O_NONBLOCK flag
- main/free_active_base
- main/many_events
- et/et (has some other bits cleaned up by using TT_* flags and test
setup/cleanup callbacks)
And hence they will fail in debug mode (EVENT_DEBUG_MODE=):
Assertion flags & O_NONBLOCK failed in event_debug_assert_socket_nonblocking_
|
|
77c0e510
|
2018-10-31T00:09:38
|
|
Cover ET with multiple events for same fd
[ azat: test cleanup ]
|
|
9cba915e
|
2018-10-28T19:30:34
|
|
Introduce EVENT_VISIBILITY_WANT_DLLIMPORT
And use it in places where event_debug() should be called (since it
requires access to "event_debug_logging_mask_" and in win32 it is
tricky).
One of this places that is covered by this patch is the test for
event_debug().
|
|
5cfb6120
|
2018-10-28T19:27:05
|
|
regress_http: use TT_BLAZER() over event_debug()
Later is pretty tricky due to exporting event_debug_logging_mask_ symbol
for win32.
|
|
fb42e0fa
|
2018-10-28T02:00:16
|
|
bench_cascase: include getopt.h only for _WIN32 (like in other places)
Fixes: #561
|
|
9fe952a0
|
2018-10-27T19:34:52
|
|
regress_ssl: reset static variables on test setup/cleanup and eliminate leaks
One tricky bit is reply to the BIO_C_GET_FD command, since otherwise it
will try to close(0) and accepted bev in ssl/bufferevent_connect_sleep
will leak. Other seems more or less trivial.
This was done to make sure that for at least generic cases does not
leak (tricky cases was listed here nmathewson/Libevent#83).
And this will allow run ssl/.. with --no-fork
|
|
7cec9b95
|
2018-10-27T19:41:52
|
|
test: export basic_test_setup/basic_test_cleanup to extend them
|
|
26ef859a
|
2018-10-27T17:21:35
|
|
Add evhttp_parse_query_str_flags()
And a set of flags:
- EVHTTP_URI_QUERY_LAST
- EVHTTP_URI_QUERY_NONCONFORMANT
Fixes: #15
|
|
d161ec38
|
2018-10-27T17:36:09
|
|
regress_http: basic evhttp_parse_query_str() coverage
|
|
32349ab6
|
2018-10-25T00:25:48
|
|
Cover evutil_v4addr_is_local_()/evutil_v6addr_is_local_()
|
|
5f1b4dfa
|
2018-10-23T00:06:47
|
|
Fix http https_basic/https_filter_basic under valgrind (increase timeout)
|
|
15bfe712
|
2018-10-22T23:38:42
|
|
http: cover various non RFC3986 conformant URIs
- http/basic_trailing_space -- covers cases when there is trailing space
after the request line (nginx handles this)
- http/simple_nonconformant -- covers non RFC3986 conformant URIs
|
|
6ac8e775
|
2018-10-21T18:31:01
|
|
Simplify bufferevent timeout tests to reduce CPU usage in between start/compare
Between start (setting "started_at") and comparing the time when
timeouts triggered with the start (test_timeval_diff_eq), there is too
much various things that can introduce extra delays and eventually could
fail the test on machine with shortage of CPU.
And this is exactly what happend on:
- travis-ci
- #262
Here is a simple reproducer that I came up with for this issue:
docker run --cpus=0.01 -e LD_LIBRARY_PATH=$PWD/lib -e PATH=/usr/bin:/bin:$PWD/bin -v $PWD:$PWD --rm -it debian:testing regress --no-fork --verbose bufferevent/bufferevent_timeout
Under limited CPU (see reproducer) the test almost always has problems
with that "write_timeout_at" exceed default timeval diff tolerance
(test_timeval_diff_eq() has 50 tolerance), i.e.:
FAIL ../test/regress_bufferevent.c:1040: assert(labs(timeval_msec_diff(((&started_at)), ((&res1.write_timeout_at))) - (100)) <= 50): 101 vs 50
But under some setup write timeout can even not triggered, and the
reason for this is that we write to the bufferevent 1024*1024 bytes, and
hence if evbuffer_write_iovec() will has some delay after writev() and
not send more then one vector at a time [1], it is pretty simple to
trigger, i.e.:
FAIL ../test/regress_bufferevent.c:1040: assert(labs(timeval_msec_diff(((&started_at)), ((&res1.write_timeout_at))) - (100)) <= 50): 1540155888478 vs 50
[1]: https://gist.github.com/azat/b72773dfe7549fed865d439e03de05c1
So this patch just send static small payload for all cases (plus a few
more asserts added).
The outcome of this patch is that all regression tests passed on
travis-ci for linux box [2]. While before it fails almost always [3].
Also reproducer with CPU limiting via docker also survive some
iterations (and strictly speaking it should has less CPU then travis-ci
workers I guess).
[2]: https://travis-ci.org/azat/libevent/builds/444391481
[3]: https://travis-ci.org/libevent/libevent/builds/444336505
|
|
2cb8eae7
|
2018-10-21T03:03:25
|
|
Do not rely on getservbyname() for most of the dns regression tests
There is only one test that uses service name getaddrinfo_async, which
manually check whether it works or not, other should not assume that it
is available and works.
There was already an attempt to overcome some possible limitations, like
lack of "http" in /etc/services in
d6bafbbeb27ff3943d6f3b6783bcded76384c31e ("test/dns: replace servname
since solaris does not have "http"")
|
|
7198bbb8
|
2018-10-21T03:03:57
|
|
Turn off dns/getaddrinfo_race_gotresolve by default
It is:
- pretty internal regression
- CPU bound
- right now failed on travis-ci machines
|
|
09c74f71
|
2018-10-21T02:50:04
|
|
Fix an error for debug locking in dns/getaddrinfo_race_gotresolve
When there is no /etc/services file evdns_getaddrinfo() will fail (with
service="ssh") and hence it will go to then "end" label with locked
rp.lock which in case of debug locking checks will bail with:
[err] ../evthread.c:220: Assertion lock->count == 0 failed in debug_lock_free
So add rp.locked flag, and unlock the lock before freeing it if it is in
locked state.
And here is how you can reproduce the issue:
$ docker run -e LD_LIBRARY_PATH=$PWD/lib -e PATH=/usr/bin:/bin:$PWD/bin -v $PWD:$PWD --rm -it debian:testing regress dns/getaddrinfo_race_gotresolve
(since debian:testing does not have /etc/services)
|
|
a5b2ed56
|
2018-10-04T01:03:10
|
|
test: cover watermarks (with some corner cases) in ssl bufferevent
|
|
8483c535
|
2018-09-14T02:24:44
|
|
evrpc: avoid NULL dereference on request is not EVHTTP_REQ_POST
Fixes: #660
|
|
7af974ee
|
2018-08-15T13:57:01
|
|
test: make sure pthread is defined
avoid warnings with any modern C99 compiler due to implicit function
declaration for pthread_create, as shown by the following :
test/regress_dns.c:2226:2: warning: implicit declaration of function
'pthread_create' is invalid in C99 [-Wimplicit-function-declaration]
THREAD_START(thread[0], race_base_run, &rp);
^
test/regress_thread.h:35:2: note: expanded from macro 'THREAD_START'
pthread_create(&(threadvar), NULL, fn, arg)
^
test/regress_dns.c:2226:2: warning: this function declaration is not a prototype
[-Wstrict-prototypes]
test/regress_thread.h:35:2: note: expanded from macro 'THREAD_START'
pthread_create(&(threadvar), NULL, fn, arg)
^
$ clang --version
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Closes: #686 (cherry-picked)
|
|
be371163
|
2018-06-16T17:16:10
|
|
Eliminate compiler warnings (at least for gcc/linux)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Closes: #646 # cherry-picked from the PR
|
|
4802c132
|
2018-08-02T09:13:33
|
|
evdns: add regress test for getaddrinfo race
|
|
d9ffd221
|
2018-05-15T12:14:05
|
|
test: make regress_dns C89 compatible
Closes: #635 (cherry-picked)
|
|
c57f5c34
|
2018-05-07T02:39:44
|
|
Make rpc headers self-compilable
Fixes: #633
|
|
23c2914f
|
2018-04-24T00:59:11
|
|
Notify event base if there are no more events, so it can exit without delay
Fixes: #623
|
|
d1c8993c
|
2018-04-24T14:46:06
|
|
test/dns: install correct RLIMIT_NOFILE in bufferevent_connect_hostname_emfile
Otherwise poll() will fail with EINVAL:
EINVAL The nfds value exceeds the RLIMIT_NOFILE value.
P.S. and cleanup this test a little, with early-return.
CI: https://travis-ci.org/libevent/libevent/jobs/370350426
|
|
e4edc7fc
|
2018-04-24T02:22:58
|
|
test/http: cover evhttp_connection_get_addr() for incomming connections
Refs: #510
|
|
a3d8f2e0
|
2018-04-24T01:45:00
|
|
test/dns: verify bufferevent_socket_connect() errorcb invoking if socket() fails
Refs: #600
|
|
623ef3cc
|
2018-04-24T01:34:06
|
|
test/dns: cleanup test_bufferevent_connect_hostname()
|
|
28b80754
|
2018-04-02T13:18:27
|
|
Fix build with LibreSSL 2.7
LibreSSL 2.7 implements OpenSSL 1.1 API except for BIO_get_init()
See also: https://bugs.freebsd.org/226900
Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
Closes: #617 (cherry-pick)
|
|
40550814
|
2018-03-20T15:12:07
|
|
Call underlying bev ctrl GET_FD on filtered bufferevents
Fixes: #611
Fixes: #610
|
|
cb6995cf
|
2018-01-04T19:26:50
|
|
test/listener: cover immediate-close logic
|
|
727bcea1
|
2017-12-01T01:29:32
|
|
http: add callback to allow server to decline (and thereby close) incoming connections.
This is important, as otherwise clients can easily exhaust the file
descriptors available on a libevent HTTP server, which can cause
problems in other code which does not handle EMFILE well: for example,
see https://github.com/bitcoin/bitcoin/issues/11368
Closes: #578 (patch cherry picked)
|
|
8a460e38
|
2017-12-05T23:26:28
|
|
listener: cover closing of fd in case evconnlistener_free() called from acceptcb
|
|
c2c08e02
|
2017-11-22T10:33:15
|
|
Add missing includes into openssl-compat.h
Before it depends from the caller #include appropriate headers (at least
for OPENSSL_VERSION_NUMBER), but let's make it independent.
Fixes: #574
|
|
306747e5
|
2017-11-04T19:13:28
|
|
Fix crashing http server when callback do not reply in place from *gencb*
This is the second hunk of the first patch
5ff8eb26371c4dc56f384b2de35bea2d87814779 ("Fix crashing http server when
callback do not reply in place")
Fixes: #567
|
|
5ff8eb26
|
2017-10-23T00:13:37
|
|
Fix crashing http server when callback do not reply in place
General http callback looks like:
static void http_cb(struct evhttp_request *req, void *arg)
{
evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL);
}
And they will work fine becuase in this case http will write request
first, and during write preparation it will disable *read callback* (in
evhttp_write_buffer()), but if we don't reply immediately, for example:
static void http_cb(struct evhttp_request *req, void *arg)
{
return;
}
This will leave connection in incorrect state, and if another request
will be written to the same connection libevent will abort with:
[err] ../http.c: illegal connection state 7
Because it thinks that read for now is not possible, since there were no
write.
Fix this by disabling EV_READ entirely. We couldn't just reset callbacks
because this will leave EOF detection, which we don't need, since user
hasn't replied to callback yet.
Reported-by: Cory Fields <cory@coryfields.com>
|
|
8b0aa7b3
|
2017-09-14T17:39:20
|
|
Port `event_rpcgen.py` and `test/check-dumpevents.py` to Python 3.
These scripts remain compatible with Python 2.
|
|
56010f37
|
2017-09-11T21:56:30
|
|
test: fix warning
In function ‘send_a_byte_cb’:
test/regress.c:1853:2: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result]
(void) write(*sockp, "A", 1);
|
|
a86f89d3
|
2017-08-16T16:52:33
|
|
test: avoid regress hanging in macOS
a backtrace of the process without this patch :
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fffb1fb7d96 libsystem_kernel.dylib`kevent + 10
frame #1: 0x0000000108ed0a58 libevent-2.2.1.dylib`kq_dispatch + 696
frame #2: 0x0000000108ec53d8 libevent-2.2.1.dylib`event_base_loop + 696
frame #3: 0x0000000108e1763b regress`test_fork + 1931
frame #4: 0x0000000108e5c7ad regress`run_legacy_test_fn + 45
frame #5: 0x0000000108e690aa regress`testcase_run_one + 858
frame #6: 0x0000000108e6954f regress`tinytest_main + 495
frame #7: 0x0000000108e5c94b regress`main + 171
frame #8: 0x00007fffb1e88235 libdyld.dylib`start + 1
frame #9: 0x00007fffb1e88235 libdyld.dylib`start + 1
Issue: #546
|
|
63c4bf78
|
2017-09-01T15:50:36
|
|
test: fix 32bit linux regress
|
|
cf7f5b0d
|
2017-06-28T12:29:29
|
|
Fix tests with detached builds
Closes: #524
|
|
15da23cf
|
2017-05-01T21:56:27
|
|
test: do not use .fieldname in structure initializations (fixes win32)
Fixes: #497
|
|
8d89c212
|
2017-05-01T21:55:00
|
|
Add missing print-winsock-errors.c into dist archive
Refs: #497
|
|
5ff83989
|
2017-04-30T01:11:31
|
|
test: cover that after event_del() callback will not be scheduled again
Refs: #236
Refs: #225
|
|
8acfb0cd
|
2017-03-14T13:21:16
|
|
test: do not return void
|
|
a4b1828d
|
2017-03-13T23:52:15
|
|
test: windows doesn't have WNOWAIT
Fixes: 66a4eb0c3ae3b1f22b084b2d3aeb5c872f37efbd ("Check for WNOWAIT in
waitpid() in runtime (not in cmake/configure)")
|
|
66a4eb0c
|
2017-03-06T00:05:50
|
|
Check for WNOWAIT in waitpid() in runtime (not in cmake/configure)
Because checking in cmake breaks cross-compiling.
Introduced-in: 43eb56c7c738e3642f0981e3dd6ab9e082eec798.
Fixes: #482
Fixes: #462
Refs: #475
v2: use waitid() with WNOWAIT
v3: use WNOWAIT only if it available in waitpid(), because not all netbsd
supports it
|
|
d057c45e
|
2017-01-28T16:42:13
|
|
Unbreak build with LibreSSL after openssl 1.1 support added
Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0")
Fixes: #445
|
|
77ec05e5
|
2017-01-28T16:28:57
|
|
test/bench*: prefix event-config.h macros after 0dda56a48e94
|
|
d9118c8d
|
2017-01-28T16:17:07
|
|
test/bench_httpclient: restore SO_LINGER usage after 0dda56a48e94
|
|
ea1d30ca
|
2017-01-20T16:29:19
|
|
test: register different tests in automake
Before this patch we have one test.sh (well test-script.sh), and tooks
very long to run it sequentially, but they are pretty lightweight, so we
should run then in parallel.
|
|
54d7473f
|
2017-01-20T16:29:02
|
|
test: run different tests under different options (in a wrapper)
|