|
e2732c90
|
2018-05-07T02:39:44
|
|
Make rpc headers self-compilable
Fixes: #633
(cherry picked from commit c57f5c34903b02c6e7378865f71a2b83a5befb96)
|
|
0d194c4e
|
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
(cherry picked from commit d1c8993c3c34030b68ecb6079bd9dce8cb3d3604)
|
|
61b95600
|
2018-04-24T02:22:58
|
|
test/http: cover evhttp_connection_get_addr() for incomming connections
Refs: #510
(cherry picked from commit e4edc7fc27bb96b4811f1c24d591f5c5bca69bdd)
|
|
d9d1c09e
|
2018-04-24T00:59:11
|
|
Notify event base if there are no more events, so it can exit without delay
Fixes: #623
(cherry picked from commit 23c2914f6b430f2c2d74c267c13ffab3dda1b325)
|
|
f3eb294f
|
2018-04-24T01:45:00
|
|
test/dns: verify bufferevent_socket_connect() errorcb invoking if socket() fails
Refs: #600
(cherry picked from commit a3d8f2e09302536c6c0ffc3ccb1fc6f43b51dc4f)
|
|
442c7d94
|
2018-04-24T01:34:06
|
|
test/dns: cleanup test_bufferevent_connect_hostname()
(cherry picked from commit 623ef3ccdc0aafac7ae77a723cbad6d552ff9a01)
|
|
894ca48a
|
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)
(cherry picked from commit 28b8075400c70b2d2da2ce07e590c2ec6d11783d)
|
|
ebfac517
|
2018-03-20T15:12:07
|
|
Call underlying bev ctrl GET_FD on filtered bufferevents
Fixes: #611
Fixes: #610
(cherry picked from commit 4055081499cba32642dd72427a8f9d3ad7e50e79)
|
|
df2ed13f
|
2018-01-04T19:28:59
|
|
Merge branch 'listener-immediate-close'
* listener-immediate-close:
test/listener: cover immediate-close logic
Immediately stop trying to accept more connections if listener disabled
(cherry picked from commit 416b48ba7a0b44407b7a053bd21830aa75d7162f)
|
|
42e851bb
|
2017-12-10T23:57:19
|
|
Merge branch 'evconnlistener-do-not-close-client-fd'
Fixes: #577
* evconnlistener-do-not-close-client-fd:
listener: cover closing of fd in case evconnlistener_free() called from acceptcb
Revert "Fix potential fd leak in listener_read_cb()"
(cherry picked from commit bc65ffc14c62c10feffefe6c3d9975ce1d1a8cd8)
|
|
01bc36c1
|
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
(cherry picked from commit c2c08e0203da93938fe35234fa3a1be4d1c3c2e1)
|
|
b2581380
|
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
(cherry picked from commit 306747e51c1f0de679a3b165b9429418c89f8d6a)
|
|
5b40744d
|
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>
(cherry picked from commit 5ff8eb26371c4dc56f384b2de35bea2d87814779)
|
|
532a8cc3
|
2017-09-14T17:39:20
|
|
Port `event_rpcgen.py` and `test/check-dumpevents.py` to Python 3.
These scripts remain compatible with Python 2.
(cherry picked from commit 8b0aa7b36a3250fad4953f194c8a94ab25032583)
|
|
7cc034c3
|
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);
(cherry picked from commit 56010f37ae5b49881f7fd255d5c8a936e1c36909)
|
|
1811a040
|
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
(cherry picked from commit a86f89d333d870e6714bd28c695ba1774df3d7f5)
|
|
8983e511
|
2017-09-01T15:50:36
|
|
test: fix 32bit linux regress
(cherry picked from commit 63c4bf78d6af3c6ff46d2e8e4b53dd9f577a9ca9)
|
|
c46ff439
|
2017-06-28T12:29:29
|
|
Fix tests with detached builds
Closes: #524
(cherry picked from commit cf7f5b0dc484152ae3be7ea6ba57552595891608)
|
|
300a0dc6
|
2017-05-01T21:56:27
|
|
test: do not use .fieldname in structure initializations (fixes win32)
Fixes: #497
(cherry picked from commit 15da23cfdbeb5d5b4eeafca0cd93962c26641ae5)
|
|
822d6462
|
2017-05-01T21:55:00
|
|
Add missing print-winsock-errors.c into dist archive
Refs: #497
(cherry picked from commit 8d89c212587c560df8cd7089fb1a2fcd2a3dca82)
|
|
23db7476
|
2017-04-30T01:11:31
|
|
test: cover that after event_del() callback will not be scheduled again
Refs: #236
Refs: #225
(cherry picked from commit 5ff83989f30daef93a851c2162667375ed1663a5)
|
|
ebd12e6d
|
2017-03-14T13:31:02
|
|
Merge branch 'win32-fixes'
This patchset fixes win32 builds after some previous patches (referenced
in particular commits), and also removes some quirks for win32.
* win32-fixes:
test: do not return void
log/win32: fix exporting extern variable
log-internal: missing extern "C"
log: remove USE_GLOBAL_FOR_DEBUG_LOGGING
cmake: Export missing symbols for win32
cmake: eliminate EVENT_BUILDING_REGRESS_TEST, since we link with shared libs
test: windows doesn't have WNOWAIT
cmake: clean not used #defines from event-config.h
cmake: add <pthread.h> only for non-win32
(cherry picked from commit d84f0205453941235b0e04729098d4329c189bba)
|
|
a0bfe2c4
|
2017-03-08T17:58:26
|
|
Merge branch 'cmake-configure-fixes-v2'
Fixes in cmake, to make it more like configure and support some
cross-compiling.
* cmake-configure-fixes-v2:
cmake: fix extracting of the version from git (check for number of matches)
Detect arch4random_addrandom() existence
Use off_t instead of ev_off_t for sendfile() (fixes android build)
cmake: detect _GNU_SOURCE not by __GNU_LIBRARY__ only (fallback to _GNU_SOURCE)
Check for WNOWAIT in waitpid() in runtime (not in cmake/configure)
cmake: add <pthread.h> into CMAKE_REQUIRED_INCLUDES for sizeof(pthread_t)
cmake: fix values for #cmakedefine
cmake: drop duplicates from event-config template
cmake: add value for the #cmakedefine macros (like autoconf)
cmake: Fix checking of enum values from sysctl.h
(cherry picked from commit 5aade2d30b6c5eff226cbf7b63fda5a01987ba4f)
|
|
230af9f0
|
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
(cherry picked from commit d057c45e8f48aa90d8b340cac4c8ae4cc8b5d0ac)
|
|
8567f2f5
|
2017-01-29T23:07:40
|
|
Merge branch 'fix-struct-linger'
@jbech
"Accidentally disabled by 0dda56a due to confusion between struct
linger vs. SO_LINGER and #define vs. AC_DEFINE. Try adding synthetic
#error test to confirm."
* fix-struct-linger:
cmake: check for 'struct linger' existence
test/bench*: prefix event-config.h macros after 0dda56a48e94
test/bench_httpclient: restore SO_LINGER usage after 0dda56a48e94
Fixes: #444 (original pull-request)
(cherry picked from commit 9d5a4bdc5cfbf2385efc7c58103161b3512c4500)
|
|
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)
|
|
e77ff418
|
2016-04-21T01:47:29
|
|
test/buffer: cover n_add_for_cb when evbuffer_prepend() need to allocate buffer
Regression-for: 0abd0393eaf029e1ead8a09b479ea6830f7152ee ("Fix n_add_for_cb in
evbuffer_prepend() in case of new buffer required")
|
|
bd19a28a
|
2016-04-21T02:11:26
|
|
test/tinytest_macros: add new one tt_nstr_op()
|
|
ae288125
|
2016-04-18T12:50:24
|
|
test/bufferevent: check that output_filter disabled during processing output
Regression-for: c031215d532c97f1d82efd672ecd622d31d3342d ("be_filter: actually
disable output_filter during processing output")
|
|
7d856516
|
2016-03-31T20:50:12
|
|
test/listener: regression for missing unlock in listener_read_cb()
P.S. it triggers even without pthread, but this makes checks more strict.
Refs: #341
|
|
d5ee7391
|
2016-03-26T14:14:44
|
|
test/regress: add tests for evbuffer_add() breakage on empty last chain
The evbuffer/add* tests currenly break on 2.0.21, 2.0.22 and 2.1 HEAD
due to issue #335. The evbuffer/reference2 test breaks on 2.0.21 and
2.0.22 due to commit b18c04dd not being applied.
|
|
bddad71e
|
2016-03-25T11:22:43
|
|
test/http: fix running some tests sequential (with --no-fork)
After this patch
$ regress --no-fork +http/..
Passed without failures.
|
|
cbc3209d
|
2016-03-25T11:04:51
|
|
test/http: localize evhttp server structure
|
|
d7348bab
|
2016-03-25T00:21:06
|
|
test/dns: regression for empty hostname
Refs: #332
|
|
d49a6587
|
2016-03-24T20:29:25
|
|
test/http: fix SERVER_TIMEOUT tests under win32
Seems that the hack with filling BACKLOG didn't work on win32, and hence we
stuck in write() waiting, not in connect()
And:
$ time regress http/cancel_server_timeout
- on linux: 10secs
- on win32: 2-5secs
I tried to debug this but you can't sniff TCP packages (wireshark/rawpcap) on
localhost in windows xp (according to [RAWPCAP] and my testing).
RAWPCAP: http://www.netresec.com/?page=RawCap
|
|
376f1073
|
2016-03-24T20:26:50
|
|
test/http: add a helper for creating timedout/failed request
|
|
d02a2858
|
2016-03-24T14:11:10
|
|
test/http: adopt for C90 (mixed code and declarations)
|
|
0c343afe
|
2016-03-24T10:27:24
|
|
test/http: cover NS timed out during request cancellations separatelly
|
|
334340da
|
2016-03-12T18:50:41
|
|
test/http: request cancellation with resolving/{conn,write}-timeouts in progress
This patch adds 8 new tests:
- http/cancel
- http/cancel_by_host
- http/cancel_by_host_no_ns
- http/cancel_by_host_inactive_server
- http/cancel_inactive_server
- http/cancel_by_host_no_ns_inactive_server
- http/cancel_by_host_server_timeout
- http/cancel_server_timeout
- http/cancel_by_host_no_ns_server_timeout
This patches not 100% for http layer, but more for be_sock, but it was simpler
to add them here, plus it also shows some bugs with fd leaking in http layer.
Right now we have next picture (we can also play with timeouts/attempts for
evdns to make tests fail, IOW to track the failures even without valgrind):
$ valgrind --leak-check=full --show-reachable=yes --track-fds=yes --error-exitcode=1 regress --no-fork http/cancel..
http/cancel: OK
http/cancel_by_host: OK
http/cancel_by_host_no_ns: [msg] Nameserver 127.0.0.1:42489 has failed: request timed out.
[msg] All nameservers have failed
OK
http/cancel_by_host_inactive_server: OK
http/cancel_inactive_server: OK
http/cancel_by_host_no_ns_inactive_server: [msg] Nameserver 127.0.0.1:51370 has failed: request timed out.
[msg] All nameservers have failed
OK
http/cancel_by_host_server_timeout: OK
http/cancel_server_timeout: OK
http/cancel_by_host_no_ns_server_timeout: [msg] Nameserver 127.0.0.1:45054 has failed: request timed out.
[msg] All nameservers have failed
OK
9 tests ok. (0 skipped)
==3202==
==3202== FILE DESCRIPTORS: 2309 open at exit.
...
==8403== HEAP SUMMARY:
==8403== in use at exit: 1,104 bytes in 5 blocks
==8403== total heap usage: 10,916 allocs, 10,911 frees, 1,458,818 bytes allocated
==8403==
==8403== 40 bytes in 1 blocks are indirectly lost in loss record 1 of 5
==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459)
==8403== by 0x498E48: evbuffer_add_cb (buffer.c:3309)
==8403== by 0x4A0DE2: bufferevent_socket_new (bufferevent_sock.c:366)
==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369)
==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421)
==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413)
==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105)
==8403== by 0x490C47: testcase_run_one (tinytest.c:252)
==8403== by 0x491586: tinytest_main (tinytest.c:434)
==8403== by 0x47DFCD: main (regress_main.c:461)
==8403==
==8403== 136 bytes in 1 blocks are indirectly lost in loss record 2 of 5
==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459)
==8403== by 0x491EDD: evbuffer_new (buffer.c:365)
==8403== by 0x49A0AB: bufferevent_init_common_ (bufferevent.c:300)
==8403== by 0x4A0D31: bufferevent_socket_new (bufferevent_sock.c:353)
==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369)
==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421)
==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413)
==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105)
==8403== by 0x490C47: testcase_run_one (tinytest.c:252)
==8403== by 0x491586: tinytest_main (tinytest.c:434)
==8403== by 0x47DFCD: main (regress_main.c:461)
==8403==
==8403== 136 bytes in 1 blocks are indirectly lost in loss record 3 of 5
==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459)
==8403== by 0x491EDD: evbuffer_new (buffer.c:365)
==8403== by 0x49A0E8: bufferevent_init_common_ (bufferevent.c:305)
==8403== by 0x4A0D31: bufferevent_socket_new (bufferevent_sock.c:353)
==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369)
==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421)
==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413)
==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105)
==8403== by 0x490C47: testcase_run_one (tinytest.c:252)
==8403== by 0x491586: tinytest_main (tinytest.c:434)
==8403== by 0x47DFCD: main (regress_main.c:461)
==8403==
==8403== 528 bytes in 1 blocks are indirectly lost in loss record 4 of 5
==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459)
==8403== by 0x4A0D02: bufferevent_socket_new (bufferevent_sock.c:350)
==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369)
==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421)
==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413)
==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105)
==8403== by 0x490C47: testcase_run_one (tinytest.c:252)
==8403== by 0x491586: tinytest_main (tinytest.c:434)
==8403== by 0x47DFCD: main (regress_main.c:461)
==8403==
==8403== 1,104 (264 direct, 840 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 5
==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459)
==8403== by 0x4D0326: evdns_getaddrinfo (evdns.c:4682)
==8403== by 0x4B1213: evutil_getaddrinfo_async_ (evutil.c:1568)
==8403== by 0x4A1255: bufferevent_socket_connect_hostname (bufferevent_sock.c:517)
==8403== by 0x4C00B6: evhttp_connection_connect_ (http.c:2582)
==8403== by 0x4C02B8: evhttp_make_request (http.c:2637)
==8403== by 0x4614EC: http_cancel_test (regress_http.c:1496)
==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105)
==8403== by 0x490C47: testcase_run_one (tinytest.c:252)
==8403== by 0x491586: tinytest_main (tinytest.c:434)
==8403== by 0x47DFCD: main (regress_main.c:461)
==8403==
==8403== LEAK SUMMARY:
==8403== definitely lost: 264 bytes in 1 blocks
==8403== indirectly lost: 840 bytes in 4 blocks
==8403== possibly lost: 0 bytes in 0 blocks
==8403== still reachable: 0 bytes in 0 blocks
==8403== suppressed: 0 bytes in 0 blocks
|
|
927ab33f
|
2016-03-13T13:05:25
|
|
test/http: exit from the loop in the errorcb to wait cancellation
This will make cancellation tests more graceful, that said that error_cb can
not be called sometimes if you will break the loop in cancel.
Plus drop that define for function generations, since function body changed,
and it is not generic anymore, plus that macro didn't used by anyone else.
|
|
351207f4
|
2016-03-22T23:10:19
|
|
regress_clean_dnsserver(): reset global port vars
This will fix some test chains with --no-fork.
|
|
3b581693
|
2016-03-11T20:06:11
|
|
test/http: read_on_write_error: fix it for win32
Fixes: https://ci.appveyor.com/project/nmathewson/libevent/build/2.1.5.216#L499 (win32)
|
|
5c2b4c19
|
2016-03-11T19:25:11
|
|
test/http: separate coverage for EVHTTP_CON_READ_ON_WRITE_ERROR
|
|
31d81163
|
2016-03-11T14:23:03
|
|
test/http: cover "Expect: 100-continue" client-server interaction
|
|
ed469abb
|
2016-03-11T16:18:48
|
|
test/http: *lingering tests shouldn't have "Expect: 100-continue"
|
|
04fc82f7
|
2016-03-11T01:27:52
|
|
test: use EVUTIL_SHUT_WR
|
|
31667659
|
2016-03-10T18:40:34
|
|
test/http: avoid huge stack allocations to fix win32 builds
Since according to [DOC] default stack size is 1MB, so let's use dynamic
allocations instead of changing defaults.
DOC: https://msdn.microsoft.com/en-us/library/8cxs58a6.aspx
Not-fixes: http/data_length_constraints
Fixes: http/lingering_close
Fixes: http/non_lingering_close
Fixes: https://ci.appveyor.com/project/nmathewson/libevent/build/2.1.5.213
|
|
e122ca1e
|
2016-02-15T03:21:39
|
|
test: http/lingering_close: cover EVHTTP_SERVER_LINGERING_CLOSE
|
|
f41e1b01
|
2016-02-15T03:13:02
|
|
test: http/non_lingering_close: cover ~EVHTTP_SERVER_LINGERING_CLOSE
|
|
addf2b90
|
2016-02-15T03:46:20
|
|
test: http/*: update expected HTTP codes for body exceeds `max_body_size`
|
|
d38a7239
|
2016-02-15T02:41:19
|
|
test: http/data_length_constrains: set EVHTTP_CON_READ_ON_WRITE_ERROR
|
|
0792e1e7
|
2016-02-10T12:37:30
|
|
test: increase buffer size for http/data_length_constraints to trigger EPIPE
With greater buffer it can't be written with one writev(2), and hence we can
trigger more tricky cases, like calling writecb/readcb more then once.
Refs: #321
|
|
f062bbe3
|
2016-02-24T14:02:37
|
|
test/tinytest_demo: include <windows.h> for win32 to fix tdm-gcc
From: @gvanem
Fixes: #325
|
|
73d0360e
|
2016-02-15T18:01:36
|
|
test/regress_ssl: Fix compile problems for win32
Windows doesn't have unistd.h, but have the required
functionality in io.h.
azat: use ev_ssize_t instead of ssize_t
|
|
4f778ab6
|
2016-01-22T11:16:05
|
|
Add missing return statement to del_wait_thread so libevent can build.
|
|
5b58b709
|
2016-01-03T00:23:22
|
|
test/regress: cover event_del() waiting mechanism
Since we have some issues (see refs) for changing waiting order in event_del()
I wrote this simple test, so maybe this test can explain something or at least
cover what we have before and show it will be broken.
P.S. we really need avoid such stuff like lets-test-with-sleep/usleep.
Refs: #225
Refs: #226
Refs: #236
|
|
ceddc607
|
2015-12-27T02:48:40
|
|
test/regress: cover existing signal callbacks and fork() + event_reinit()
Regression-for: 88640aa ("event_reinit: make signals works after fork() without
evsig_add()")
|
|
b075b81c
|
2015-12-27T09:26:54
|
|
test/regress: cover signals after fork() + event_reinit()
Regression-for: ad0c237 ("event_reinit: always re-init signal's socketpair")
|