|
2f656ffb
|
2019-01-20T22:40:57
|
|
test/buffer: write >GETPIPE_SZ via events over pair to avoid stall
[ Upstream commit 0aad01436af27c5807d48701028020bb51cba387 ]
|
|
70a39d45
|
2018-10-31T00:09:38
|
|
Cover ET with multiple events for same fd
[ Upstream commit 77c0e510581b88242d7d7bcff4954cedc5613554 ]
Refs: #636
|
|
4d73149f
|
2014-03-18T12:35:39
|
|
Remove integer-overflow unit tests
[ Upstream commit e5302ac7 ]
[ Fixes clang builds -- https://travis-ci.org/azat/libevent/jobs/446053765 ]
There's not much point checking undefined behavior.
|
|
33845824
|
2014-03-18T18:36:32
|
|
Correctly skip ipv6 http test on systems without ipv6
[ Upstream commit 6a1c4d50 ]
|
|
b52e95f5
|
2014-03-12T18:13:19
|
|
Skip http/ipv6_for_domain test when we have no ipv6 support
[ Upstream commit 21477e40 ]
|
|
6f18f88e
|
2018-10-25T09:44:58
|
|
Remove for loop initial declaration and fix conflicting type in it (gcc 4.8)
From [1]:
regress_buffer.c:742:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 1 << 16; ++i) {
^
regress_buffer.c:742:3: note: use option -std=c99 or -std=gnu99 to compile your code
regress_buffer.c:787:23: error: conflicting types for ‘bufread’
for (int n = toread, bufread = toread;
^
regress_buffer.c:717:51: note: previous definition of ‘bufread’ was here
size_t datalen = strlen(data), toread = datalen, bufread = 0;
^
regress_buffer.c:787:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = toread, bufread = toread;
^
[1]: https://travis-ci.org/azat/libevent/jobs/445501665
|
|
b2beaad6
|
2018-10-24T01:18:41
|
|
Skip all dns tests that hit the network
But since this version of tinytest do not have TT_OFF_BY_DEFAULT use
TT_SKIP instead.
[ Upstream commit f2cea873bb8c4e1e89cc282470a11556e4bd9730 ]
|
|
9e6f6503
|
2018-10-21T18:31:01
|
|
Simplify bufferevent timeout tests to reduce CPU usage in between start/compare
[ Upstream commit 6ac8e775 ]
[ Fixes: #262 ]
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
|
|
dd3e841c
|
2017-12-18T01:02:25
|
|
Cover evbuffer_add_file() with offset
|
|
0091da36
|
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.
|
|
066a4f6f
|
2013-01-27T02:17:02
|
|
Add regress test ipv6_for_domain.
Written for commit 71e709c7829275a594f767b27468b1b52e8b5bb9.
Fix ipv6 support for http. When URL contain domain, not IP address.
backporting to 2.0: fix conflicts with the name of the main function --
_http_connection_test().
|
|
79800df7
|
2014-03-25T13:35:13
|
|
regress_buffer: fix 'memcmp' compare size
|
|
b6182042
|
2013-02-14T09:54:56
|
|
fix #73 and fix http_connection_fail_test to catch it
|
|
a55514ee
|
2013-02-08T22:08:18
|
|
Avoid using top_srcdir in TESTS-new automakes do not like this
|
|
f38e0788
|
2012-11-18T01:36:03
|
|
Make ssl version check in unit tests work
|
|
f3009e48
|
2012-11-16T10:28:19
|
|
Make rpcgen_wrapper.sh work on systems without a "python2" binary
|
|
ac009f92
|
2012-11-15T11:43:20
|
|
Warn when openssl version in unit test mismatches compiled version.
|
|
c2f30863
|
2012-11-15T11:42:14
|
|
Fix renegotiation test to work around openssl 1.0.1 bug
There's a bug in openssl 1.0.1 where TLS1.1 and TLS1.2 can't
renegotiate with themselves. When testing renegotiation with OpenSSL
>=1.0.1 and <1.0.1d, disable those protocols.
|
|
94866c27
|
2012-11-01T17:38:34
|
|
Compile without warnings on mingw64
This is mostly a matter of catching cases where we were still
assuming that evutil_socket_t could be used as an int.
|
|
a2006c00
|
2012-07-26T10:37:47
|
|
Move assignment outside tt_assert in ssl unit tests. Appeases coverity.
|
|
b9e73297
|
2012-07-26T10:37:13
|
|
Add checks to various return values in unit tests. Found by coverity
|
|
6355b2a4
|
2012-07-26T10:16:47
|
|
Remove unused variable; spotted by coverity
|
|
3cde5bf5
|
2012-07-26T10:04:43
|
|
Avoid more crashes/bad calls in unit tests; found by coverity
|
|
f021c3d7
|
2012-07-26T09:59:47
|
|
Add some missing null checks to unit tests; found by coverity
|
|
270f279f
|
2012-07-26T09:53:20
|
|
Fix resource leaks in the unit tests; found by coverity
|
|
4f3732d7
|
2012-07-26T09:35:43
|
|
Fix various check-after-dereference issues in unit tests: found by coverity
|
|
f1ce15d9
|
2012-07-25T16:18:33
|
|
Set umask before calling mkstemp in unit tests. Found by coverity
|
|
2259777c
|
2012-07-25T16:05:36
|
|
Fix possible uninitialized read in dns regression tests. Found by coverity.
|
|
55533467
|
2012-07-25T15:59:50
|
|
Remove deadcode in http regression tests. Found by coverity.
|
|
3b2529ac
|
2012-06-06T21:57:12
|
|
Fix a couple of memory leaks (found with Valgrind).
|
|
e06206eb
|
2012-05-03T12:15:11
|
|
Oops; fix the *right* windows compile issue
|
|
be7a0be8
|
2012-05-03T12:05:52
|
|
Fix win32 build issues: sleep, pid_t
|
|
30f06715
|
2012-04-30T21:45:43
|
|
Merge remote-tracking branch 'github/20_active_prio_inv' into patches-2.0
|
|
b3887cdf
|
2012-04-11T21:33:27
|
|
Work-around a stupid gcov-breaking bug in OSX 10.6
This only affects the unit tests.
Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/
(Backport from 2.1)
|
|
2bfda401
|
2012-04-30T17:30:48
|
|
If a higher-priority event becomes active, don't continue running events of the current priority.
Bug found by Ralph Castain.
|
|
dfd808cb
|
2012-04-19T00:25:12
|
|
If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead
Fixes an issue reported on libevent-users in the thread "a dead
looping bug when changing system time backward". Previously, if time
jumped forward 1 hour[*] and we had a one-second periodic timer event,
that event would get invoked 3600 times. That's almost certainly not
what anybody wants.
In a future version of Libevent, we should expose the amount of time
that the callbac kwould have been invoked somehow.
[*] Forward time jumps can happen with nonmonotonic clocks, or with
clocks that jump on suspend/resume. It can also happen from
Libevent's point of view if the user exits from event_base_loop() and
doesn't call it again for a while.
|
|
2d67b638
|
2012-02-14T15:37:58
|
|
Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD
|
|
92781968
|
2012-02-14T15:01:02
|
|
Added OPENSSL_LDFLAGS env variable which is appended to SSL checks.
If openssl is not installed system-wide or not compiled as a shared library,
some systems require various link flags (e.g., -ld).
|
|
e49e2891
|
2012-02-10T17:29:53
|
|
Update copyright notices to 2012
|
|
9f9e259f
|
2012-01-26T15:04:24
|
|
Better workaround for Linux 3.2 edge-triggered epoll bug
On further investigation, it appears that this problem is limited to
AF_UNIX sockets, so let's just do the test on AF_INET sockets.
|
|
5408ff3b
|
2012-01-24T11:16:26
|
|
Oops:remove an accidentally committed "sleep(1)" in a unit test
|
|
dab91877
|
2012-01-24T11:04:19
|
|
Workaround in the unit tests for an apparent epoll bug in Linux 3.2
|
|
3312b020
|
2012-01-23T17:43:35
|
|
Check event_base correctness at end of each unit test
|
|
27737d55
|
2012-01-21T12:55:15
|
|
Add function to check referential integrity of an event_base
|
|
cba48c7d
|
2012-01-09T16:44:53
|
|
Fix a race condition in the dns/bufferevent_connect_hostname test.
As originally written, the test would only pass if the accept()
callbacks for the evconnlistener were all invoked before the last of
the CONNECTED/ERROR callbacks for the connecting/resolving bufferevent
had its call to event_base_loopexit() complete. But this was only
accidentally true in 2.0, and might not be true at all in 2.1 where
we schedule event_base_once() callbacks more aggressively.
Found by Sebastian Hahn.
|
|
c986f232
|
2011-12-08T14:30:20
|
|
Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0)
(Patch altered by nickm to not affect the behavior of
evbuffer_peek(buf,-1,NULL,vec,n_vec).)
|
|
19277763
|
2011-12-06T13:35:54
|
|
Fix a silly compilation error with the sun compiler
Apparently, other compilers were allowing "return free(x)" in a
function returning void.
|
|
b17b0eec
|
2011-11-15T17:11:42
|
|
Fix DNS memleak checks when running with malloc-replacement/debugging disabled
|
|
7eb52eb8
|
2011-11-02T15:19:05
|
|
improve test to remove at least one buffer from src
|
|
90bd620f
|
2011-11-01T13:44:40
|
|
unit test for remove_buffer bug
|
|
3c824bd3
|
2011-10-24T13:18:09
|
|
Update copyright dates to 2011.
|
|
5e42202d
|
2011-10-19T22:41:11
|
|
Style and comment tweaks for dns/leak* tests
|
|
f7841bfc
|
2011-10-18T17:49:40
|
|
Test for commit aff6ba1
|
|
21a08d68
|
2011-10-19T22:38:37
|
|
Empty DNS reply with OK status is another way to say NODATA.
Sometimes DNS reply has nothing but query section. It does not look like
error, so it should be treated as NODATA with TTL=0 as soon as there is
no SOA record to deduce negative TTL from.
|
|
d58c15ee
|
2011-10-19T22:36:12
|
|
Tests for 94fba5b and f72e8f6
|
|
706aa5f4
|
2011-10-06T15:11:50
|
|
Merge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0
|
|
2b768479
|
2011-10-03T12:45:36
|
|
Make write-checking fixes use tt_fail_perror
|
|
c3b62fd7
|
2011-07-12T13:05:36
|
|
Fixed compiler warnings for unchecked read/write calls.
|
|
0ba0af9c
|
2011-09-29T09:30:04
|
|
Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL.
The sendfile() implementation for evbuffer_add_file is potentially more
efficient, but it has a problem: you can only use it to send bytes over
a socket using sendfile(). If you are writing bytes via SSL_send() or
via a filter, or if you need to be able to inspect your buffer, it
doesn't work.
As an easy fix, this patch disables the sendfile-based implementation of
evbuffer_add_file on an evbuffer unless the user sets a new
EVBUFFER_FLAG_DRAINS_TO_FD flag on that evbuffer, indicating that the
evbuffer will not be inspected, but only written out via
evbuffer_write(), evbuffer_write_atmost(), or drained with stuff like
evbuffer_drain() or evbuffer_add_buffer(). This flag is off by
default, except for evbuffers used for output on bufferevent_socket.
In the future, it could be interesting to make a best-effort file
segment implementation that tries to send via sendfile, but mmaps on
demand. That's too much complexity for a stable release series, though.
|
|
9ae061ac
|
2011-09-15T13:06:38
|
|
le-proxy and regress depend on openssl directly
|
|
0ff2c5a9
|
2011-08-24T18:42:12
|
|
Have test-ratelim.c support IOCP
|
|
2f51dc03
|
2011-08-28T14:03:10
|
|
Cleanup on 7c11e51e1ab: fix strtol usage
|
|
7c11e51e
|
2011-08-27T05:48:11
|
|
Clean up some problems identified by Coverity.
|
|
04656ea8
|
2011-08-15T14:40:32
|
|
Try to fix 'make distcheck' errors when building out-of-tree
|
|
b3b425eb
|
2011-07-18T12:45:50
|
|
Give Makefile.am echo a non-null argument. msys likes this
|
|
caf695af
|
2011-07-05T14:55:09
|
|
Fix up test_evutil_snprintf
|
|
af6a05f7
|
2011-07-05T14:51:24
|
|
Merge remote-tracking branch 'github/20_size_fmt' into patches-2.0
|
|
b031adf1
|
2011-06-14T14:37:49
|
|
Don't break when building tests from git without python installed
|
|
812d42e8
|
2011-06-11T01:26:54
|
|
Simplify windows commandname logic in tinytest
Instead of using a dup'd pointer, let's use a static array, so we
don't need to free it. This patch also makes tinytest build on
non-windows again.
|
|
57def346
|
2011-06-11T00:49:24
|
|
Fix tinytest invocation from windows shell
Original post:
This post is in response to a posting last December on a Windows
regression fork failure ([Libevent-users] Re: Libevent 2.0.10-stable
is released by Dongsheng Song). I noticed the question was not
answered and I recently experienced the same error myself when
trying to run the Windows regression tests myself.
I checked the return status from the CreateProcess call and found it
was "file not found". This led me to look at the command-line I was
using which was .\regress in a Visual Studio 2008 command prompt
window. Windows could not find the file because it did not have the
.exe extension on the end. The code that builds the command should
be modified to ensure the extension is present.
|
|
3203f88c
|
2011-06-08T17:18:03
|
|
Use the correct printf args when formatting size_t
Based on a patch from Mansour Moufid
|
|
4461f1a0
|
2011-06-06T15:11:28
|
|
Fix incorrect results from evbuffer_search_eol(EOL_LF)
Our evbuffer_strchr() function [which was only used for
search_eol(EOL_LF) could give incorrect results if it found its answer
in the first chunk but didn't start searching from the front of the
chunk.
Also, this patch adds unit tests for evbuffer_search_eol, particularly
in those cases that evbuffer_readln() tests didn't exercise.
|
|
bdfb8330
|
2011-06-03T17:06:17
|
|
Fix regress_ssl.c build on openbsd
|
|
f47c15e7
|
2011-05-27T23:28:17
|
|
Make the new http_connect_fail_test use a multicast addr, not broadcast
Turns out that FreeBSD does _not_ give a ENETUNREACH error when
told to make a TCP socket to 255.255.255.255, but it is quite happy
to do so for 239.10.20.30. So that's what we'll do.
Found by Robert Ransom and Dave Hart.
|
|
c11c6fcd
|
2011-05-27T14:57:55
|
|
Disable main/many_events_slow_add with evport backend
In 2.0 and earlier, evport only reports up to 8 events at a time, which
confuses this test badly.
|
|
d1b2d11b
|
2011-05-26T02:05:54
|
|
Always use evutil_snprintf, even if OS provides it
In test/tinytest_local.h we can't redefine snprintf if the OS has it
defined already.
|
|
0de87fe6
|
2011-05-25T15:11:01
|
|
Use evutil_gettimeofday instead of relying on the system gettimeofday.
|
|
3d768dc9
|
2011-05-25T11:04:43
|
|
Fix winsock2.h #include issues with MSVC
Define WIN32_LEAN_AND_MEAN, so that windows.h does not bring in
winsock.h which in turn makes it impossible to #include <winsock2.h>
(at least with MSVC)
|
|
8fa030c0
|
2011-05-26T00:03:38
|
|
Make sure TINYTEST_LOCAL is defined when building tinytest.c
|
|
fe93022a
|
2011-05-25T10:58:48
|
|
unistd.h and sys/time.h might not exist.
|
|
06a714ff
|
2011-05-25T16:51:25
|
|
Fix new warnings from GCC 4.6
|
|
57ddda78
|
2011-05-23T01:40:05
|
|
Test case for 0848814ac49616
"I'm not sure if you'll like my use of the limited broadcast address
for simulating an ENETUNREACH error with a TCP connection, but it's
the best that I could think of. Basically, we want to trigger a
non-EINPROGRESS error in evutil_socket_connect() immediately at the
connect() in order to bring about the assertion in the
evhttp_connection_fail() error handling code."
|
|
5786b91e
|
2011-05-05T18:02:42
|
|
Fix a compile warning with zlib 1.2.4 and 1.2.5
I took this fix from Tor (commit 1a52e39c22d5, author Nick Mathewson,
Copyright (c) 2007-2011, The Tor Project, Inc.) and adapted it slightly
for libevent.
|
|
7b819f2d
|
2011-05-04T16:37:58
|
|
Libtool brings in the dependencies of libevent_openssl.la automatically
|
|
274dd036
|
2011-05-04T16:34:28
|
|
libssl depends on libcrypto, not the other way around.
|
|
d11e9e0f
|
2011-05-03T14:22:48
|
|
Oops; that new unit test breaks for epoll. Fix it.
|
|
28317a08
|
2011-05-03T13:54:57
|
|
Fix a warn-and-fail bug in kqueue by providing kevent() room to report errors
Apparently, kevent fails gracefully if there is not enough space in its
output events array to report every _event_... but it just dies and returns
-1 if there is not enough space to report every _error_.
There are a couple of possible fixes here. One would to handle -1
returns from kevent better by re-growing the array and retrying... but
that seems a little error prone. Instead, I'm just going to say that
the events array must be large enough to handle all the errors.
This patch also adds a unit test designed to make sure that our
many-events-out code works even if not all the events are added at
once.
|
|
ea0d019b
|
2011-04-23T02:35:17
|
|
Use AM_CONDITIONAL, not AC_SUBST, to tell automake to build regress
For some reason, this makes mingw much happier about building
regress.exe by default. No, I'm afraid I don't know why.
|
|
dd68cce4
|
2011-04-23T01:47:43
|
|
Add missing header for regress_http compilation on win32
|
|
646f9feb
|
2011-04-23T02:22:08
|
|
Zero a struct sockaddr_in before using it
Found by Dave Heart
|
|
93a1abb3
|
2011-04-11T18:26:48
|
|
Check return value of evbuffer_add_cb in tests
Caught by clang's static analyzer
|
|
48c44a6d
|
2011-04-11T17:48:23
|
|
Refactor test_getaddrinfo_async_cancel_stress()
Turns out it didn't need an event base set up.
Spotted by clang's static anaylzer
|
|
b693c324
|
2011-04-11T17:32:03
|
|
Actually send NULL request in http_bad_request_test
Issue caught by clang's static analyzer
|
|
3819b62c
|
2011-04-11T17:23:08
|
|
Add a forgotten return value check in the unit tests
Spotted by clang's static analyzer
|
|
3f79a3a0
|
2011-02-23T09:19:08
|
|
Continue AM_CFLAGS to AM_CPPFLAGS correction
9c469db300e1b270a93c6b04c1709ac0f7751136 had started with the conversion
but left out another instance of incorrectly used AM_CFLAGS.
Dave Hart provided the suggestion for this fix.
|
|
5dc200b7
|
2011-02-22T18:53:55
|
|
Merge branch '20_uri_nonconformant' into patches-2.0
|
|
15b2408c
|
2011-02-22T16:13:49
|
|
Use $(), not @@, for LIBEVENT_GC_SECTIONS
|
|
039b9bd0
|
2011-02-22T00:31:56
|
|
Use %s with printf in test.sh
|
|
9c469db3
|
2011-02-13T02:27:42
|
|
Correct an AM_CFLAGS to an AM_CPPFLAGS in test/Makefile.am
|
|
49e9bb7f
|
2011-02-13T02:05:04
|
|
Add configure options to disable installation, regression tests
The main reason for disabling installation is if you're building
libevent as a subpackage for embedding: you want to have your main
package's "make all" build libevent, but you don't want your main
package's "make install" to install libevent.
|