|
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)
|
|
d6bafbbe
|
2017-01-20T02:11:35
|
|
test/dns: replace servname since solaris does not have "http"
Yes, by default solaris (solaris10.dev 5.10 Generic_147148-26 i86pc i386 i86pc)
does not have "http" in /etc/services
|
|
09b62013
|
2016-12-08T02:11:22
|
|
test/ssl: fix bufferevent_getfd() for bufferevent_openssl_filter_new()
|
|
d77fcea1
|
2016-12-07T03:07:59
|
|
test/https: separate cases for https client with filtered openssl bufferevent
- http/https_filter_chunk_out # now hang
- http/https_filter_basic # works, since writes only before connect()
|
|
d047c241
|
2016-12-02T18:32:03
|
|
test/ssl: cover case when we writing to be_openssl after connecting
Right now it fails because of regression for filtered openssl
bufferevent, and by it I mean ssl/bufferevent_filter_write_after_connect
test, and by fails - hang.
Regression-for: da52933550fd4736aa1c213b6de497e2ffc31e34 ("be_openssl:
don't call do_write() directly from outbuf_cb")
|
|
3c7422fc
|
2017-01-19T20:51:38
|
|
test/thread: netbsd is too slow, increase timeout for conditions_simple
|
|
07862531
|
2017-01-19T20:34:41
|
|
test/dns: run async resolving after sync one (to avoid timeouts)
If system resolver (sync one) will respond too slow, then we can fail async
request and evdns will retransmit tham again, but evdns server will accept that
failed requets, so we will have not 2 requests but 4.
Reproduced on centos box sometimes.
|
|
26f416c1
|
2017-01-07T11:48:28
|
|
test/http: turn off some tests that based on backlog filling (falky)
Since this technique does not work well everywhere, anyway it fails from time
to time.
See: https://travis-ci.org/libevent/libevent/jobs/186426446
|
|
4798de6c
|
2016-12-22T14:55:33
|
|
test: fix util/date_rfc1123 under win32
Refs: #417
v2: check when gmtime() returns NULL
v3: fix overflow cases
|
|
4545807d
|
2016-12-19T10:22:51
|
|
Fix UB in evutil_date_rfc1123()
As pointed in https://github.com/libevent/libevent/pull/417#issuecomment-267860738
"code is unsafe because in evutil_date_rfc1123() the pointer to the
automatic variable struct tm cur is used outside the scope it defined."
Checked with `clang -fsanitize=address -fsanitize-address-use-after-scope`
and test that call evutil_date_rfc1123() with tm==NULL
|
|
360aa233
|
2016-12-16T14:49:59
|
|
add tests for evutil_date_rfc1123().
|
|
cfe2ab22
|
2016-11-19T17:53:38
|
|
test/https: fix ssl dirty bypass for https_simple
Tests:
- http/https_simple_dirty # not affected, since dirty is the default
- http/https_simple # affected
v2: fix compilation with -DEVENT__DISABLE_OPENSSL=ON
|
|
45247e6f
|
2016-11-19T15:54:52
|
|
test/https: cover multiple request over the same connection
Introduce two new tests:
- http/https_connection # fail
- http/https_persist_connection # ok
Reported-by: liutao74748@163.com
|
|
e6ae069b
|
2016-11-19T17:11:35
|
|
test/http: sanity check for http_request_empty_done()
|
|
532a47ce
|
2016-11-14T02:17:51
|
|
test: fix building under openssl 1.1 (init functions has been deprecated)
Refs: #397
|
|
336f3b11
|
2016-12-06T13:15:27
|
|
Fix _FILE_OFFSET_BITS redinition (solaris/autotools)
So firstly include our header (config.h) -- <evconfig-private.h>, and
only after it <sys/types.h> since latest has #ifdef guard, while our
config.h is not inteded for this.
And besides all this thing with LARGE_FILE is a abit awkward, since we
don't nefine _LP64/_LP32 anyway, and so we have next error actually (64bit VS
32bit):
==> solaris: In file included from ./util-internal.h:30:0,
==> solaris: from test/regress_ssl.c:49:
==> solaris: ./evconfig-private.h:29:0: warning: "_FILE_OFFSET_BITS" redefined
==> solaris: #define _FILE_OFFSET_BITS 64
==> solaris: ^
==> solaris: In file included from /usr/include/sys/types.h:17:0,
==> solaris: from test/regress_ssl.c:38:
==> solaris: /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0: note: this is the location of the previous definition
==> solaris: #define _FILE_OFFSET_BITS 32
==> solaris: ^
For cmake it commented in: 8b228e27f57300be61b57a41a2ec8666b726dc34
("Lot's of cmake updates")
|
|
253e7fa9
|
2016-12-06T12:08:32
|
|
util-internal: fix __func__ redefinition (netbsd)
==> netbsd: In file included from ../listener.c:57:0:
==> netbsd: ../util-internal.h:58:0: warning: "__func__" redefined [enabled by default]
==> netbsd: #define __func__ EVENT____func__
==> netbsd: ^
==> netbsd: In file included from /usr/include/amd64/types.h:39:0,
==> netbsd: from /usr/include/sys/types.h:45,
==> netbsd: from ../listener.c:30:
==> netbsd: /usr/include/sys/cdefs.h:394:0: note: this is the location of the previous definition
==> netbsd: #define __func__ __PRETTY_FUNCTION__
|
|
2c62062e
|
2016-12-06T11:55:44
|
|
Fix signedness differ for iov_base (solaris)
|
|
6bf2061c
|
2016-11-11T17:51:37
|
|
C90 doesn't like declarations intermingled with statements
So move all of the declarations to the top of the offending function.
This patch includes both of issues (Fixes:), from @jeking3 and
@pprindeville
Fixes: #418
Fixes: nmathewson/Libevent#136
|
|
cb0df5cf
|
2016-07-15T02:27:23
|
|
test/regress: cover a polling of invalid fd
Test that an event's callback is called if the fd is closed prior to being
polled for activity.
azat: make it run only for poll backend/method, and do not close fd
twice
|
|
e9837124
|
2014-12-13T19:42:42
|
|
use ev_uint16_t instead of unsigned short for port
Like in `sockaddr_in` structure in /usr/include/netinet/in.h
@azat: convert all other users (bench, compat, ..) and tweak message
Fixes: #178
Fixes: #196
Refs: 6bf1ca78
Link: https://codereview.appspot.com/156040043/#msg4
|
|
3e9e0a0d
|
2016-09-19T22:05:15
|
|
Make it build using OpenSSL 1.1.0
Rebased (azat):
- tabs instead of whitespaces
- make openssl-compat.h safe for complex expressions
- do not call sk_SSL_COMP_free() in 1.1 (fixes double free)
TODO:
- clean methods_bufferevent
Closes: #397 (cherry-picked)
|
|
f9803a69
|
2016-10-12T17:49:10
|
|
Switch from a 512 to 2048-bit RSA key.
The 512 bit key is too small to sign larger hashes. This can cause the
regression tests to fail depending on the defaults in libssl.
|
|
43eb56c7
|
2016-08-11T16:15:45
|
|
tests: use waitpid(..., WNOWAIT) to fix failing of main/fork under solaris
According to solaris docs:
"One instance of a SIGCHLD signal is queued for each child process whose
status has changed. If waitpid() returns because the status of a child
process is available, and WNOWAIT was not specified in options, any pending
SIGCHLD signal associated with the process ID of that child process is
discarded. Any other pending SIGCHLD signals remain pending."
And interesting thing that it works if you add sleep(1) before waitpid(), and
also if you run with --verbose (some race or what).
But linux doesn't support WNOWAIT in waitpid() so add detection into
cmake/autotools.
Fixes: #387
Link: https://bugzilla.redhat.com/show_bug.cgi?id=840782
|
|
16d220cb
|
2016-08-11T13:43:14
|
|
test: replace sleeping with syncing pair in main/fork
About this syncing pair:
- read endpoint, must be blocked, to make it a checkpoint or smth like this
- write endpoint, must be nonblocking, to avoid readcb hung
Refs: #387
|
|
500b6b75
|
2016-08-10T16:50:19
|
|
test/http: do not run tests that based on backlog filling (freebsd)
I cannot find any other solution for now, so simply ignore them for now, we
should think about normal fix for this.
Refs: #388
|
|
4410e9df
|
2016-08-10T12:07:32
|
|
test/bufferevent/iocp: fix test name for "bufferevent_connect_fail_eventcb"
|
|
a9e8cd67
|
2016-08-09T12:25:11
|
|
test/ssl: use send()/recv()/EVUTIL_ERR_RW_RETRIABLE()/EVUTIL_SOCKET_ERROR() to fix win32
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.5.107/job/k70our1xdp0ym4dm#L1906
Fixes: ssl/bufferevent_connect_sleep
|
|
d5a2f2f9
|
2016-08-09T12:10:18
|
|
test/https_basic: increase timeout for complete write (fixes win32)
Otherwise on win32 we got 2, but test is ok, some timings issue.
Introduced-in: c968eb3
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.5.107/job/k70our1xdp0ym4dm#L1906
|
|
a487706e
|
2016-08-07T23:14:01
|
|
test: fix building with --disable-thread-support under win32
|
|
bb09535b
|
2016-08-07T22:19:39
|
|
autoconf: fix --disable-thread-support build under win32
Fixes: https://ci.appveyor.com/project/azat/libevent/build/job/gvud4tcqsd5bnarl
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.6.80/job/5frnb1c3n4quxxqy
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.6.80/job/3wdahbrew7setmoa
|
|
48dab7aa
|
2016-06-22T15:48:51
|
|
test/buffer: cover evbuffer_expand() for overflow
Refs: #306
Refs: #340
|
|
a69e4fad
|
2016-06-19T13:24:18
|
|
buffer: Merge branch 'evbuffer-empty-chains-fixes-v4'
This fixes bug with empty-chains and
evbuffer_add_buffer()/evbuffer_remove_buffer().
* evbuffer-empty-chains-fixes-v4:
buffer: evbuffer_add_buffer(): clean empty chains from destination buffer
test/buffer: evbuffer_add_buffer() with empty chains
test/buffer: evbuffer_remove_buffer() with empty chains (prepend)
test/buffer: evbuffer_remove_buffer() with empty chains (evbuffer_add_buffer())
Reported-by: Eduardo Panisset <eduardo@anchorfree.com>
|
|
766194b3
|
2016-06-19T02:09:50
|
|
test/be_filter: creating test case for data stuck with active watermarks
v2: fix whitespaces
s/int/size_t/
use tt_int_op()
s/malloc/calloc (to avoid possible false-positive)
|
|
28518896
|
2016-05-21T21:05:11
|
|
Fix bufferevent_pair to properly set BEV_EVENT_{READING,WRITING} on flush.
Here's some fun. From `bufferevent.h`:
```
#define BEV_EVENT_READING 0x01 /**< error encountered while reading */
#define BEV_EVENT_WRITING 0x02 /**< error encountered while writing */
```
And from `event.h`:
```
/** Wait for a socket or FD to become readable */
#define EV_READ 0x02
/** Wait for a socket or FD to become writeable */
#define EV_WRITE 0x04
```
Library users have to be very careful to get this right; it turns out, the
library itself got this wrong in the `bufferevent_pair` code. It appears that
in most of the code, only `BEV_EVENT_FINISHED` will indicate whether it's read
or write; on error or timeout, it appears that "both" is assumed and not set in
the callback. I read through all the other places where `BEV_EVENT_FINISHED` is
passed to an event callback; it appears that the pair code is the only spot
that got it wrong.
azat: add TT_FORK to avoid breaking clean env, and rebase commit message
(copied from #359)
Fixes: #359
|
|
a272bc42
|
2016-06-17T15:54:53
|
|
test/buffer: evbuffer_add_buffer() with empty chains
Reported-by: @EMPanisset
Link: https://github.com/libevent/libevent/issues/358#issuecomment-225345697
|
|
f0cfa146
|
2016-06-08T13:41:30
|
|
test/buffer: evbuffer_remove_buffer() with empty chains (prepend)
Using:
- evbuffer_add()
- evbuffer_prepend_buffer()
- evbuffer_add_reference()
- evbuffer_remove_buffer()
|
|
2880ce6a
|
2016-06-07T14:56:32
|
|
test/buffer: evbuffer_remove_buffer() with empty chains (evbuffer_add_buffer())
Using:
- evbuffer_add()
- evbuffer_add_buffer() -- the one that has problem
- evbuffer_add_reference() -- the only one that allows empty chains to be added
- evbuffer_remove_buffer()
|
|
2a4bf294
|
2016-06-17T16:14:02
|
|
test/http: avoid using conditionals with omitted operands (fixes VS2015)
But we need to add VS2015 build on appveyor.
Fixes: #361
Reported-by: @nntrab
|
|
aabf1c2d
|
2016-06-17T16:07:15
|
|
test/http: don't mix declarations and code (fixes -Wdeclaration-after-statement)
|
|
c08d90ba
|
2016-06-17T15:54:31
|
|
test/buffer: fix leak in test_evbuffer_prepend()
|
|
e7d1e392
|
2016-06-17T15:43:26
|
|
test/buffer: avoid errors with --no-fork (reinitialize static vars)
|