1148 Commits

Author SHA1 Message Date
Andrew Sweeney
b85f398704 Update unit test to make sure that the callback happens after the output data is written 2014-01-06 21:19:15 -05:00
Nick Mathewson
f9e091bf4e Merge remote-tracking branch 'asweeny86/event-count-max' 2014-01-06 12:11:30 -05:00
Andrew Sweeney
b083ca0551 Provide on request complete callback facility
This patch provides the ability to receive a callback on the completion of a
request.  The callback takes place immediately before the request's resources
are released.
2014-01-05 20:35:46 -05:00
Andrew Sweeney
26230a2d21 Added unit test for max event counts 2014-01-05 16:30:35 -05:00
Nick Mathewson
b4ef3def6f Merge remote-tracking branch 'mistotebe/bufferevent_trigger' 2013-12-24 10:33:58 -05:00
Nick Mathewson
87fa2b004a Unit tests for active_by_fd; unsupport active_by_fd(TIMEOUT)
[It turns out that event_base_active_by_fd(TIMEOUT) didn't actually
work right. Feel free to add it back in as a patch.]
2013-12-23 20:46:38 -05:00
Joakim Soderberg
0ef1d04e44 Get rid of unknown pragma warnings. 2013-12-17 14:32:07 +01:00
Joakim Söderberg
69c3516be6 Get rid of deprecation warnings for OpenSSL on OSX 10.7+ 2013-12-17 13:28:23 +01:00
Joakim Soderberg
8f2af50f38 Don't segfault on no found event backend. 2013-12-16 13:45:45 +01:00
Joakim Soderberg
78da644f3d Fix bench_cascade program on Windows. 2013-12-16 11:35:31 +01:00
Joakim Soderberg
dbf2b5171a Use evutil_closesocket instead. 2013-12-16 11:26:29 +01:00
Joakim Soderberg
99c1dc3233 More work on adding tests to CMake project 2013-12-12 18:21:11 +01:00
Joakim Soderberg
e9fc014c86 Add all tests and benchmarks to CMake project.
Also fixed some minor issues with what's built.
2013-12-12 16:33:20 +01:00
Joakim Soderberg
e415196a7d Initial CMake commit. 2013-12-09 18:05:32 +01:00
Ondřej Kuzník
a7384c7824 Add an option to trigger bufferevent event callbacks 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
61ee18b8b1 Add an option to trigger bufferevent I/O callbacks 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
4ce242bd00 Add watermark introspection 2013-12-03 23:39:13 +00:00
Azat Khuzhin
4dd500cdf4 regress_http: add tests for evhttp_connection_get_addr() 2013-10-14 11:22:30 -04:00
Azat Khuzhin
611e28b6ee regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset 2013-10-01 20:22:27 +04:00
Nick Mathewson
0a051ef93c Merge remote-tracking branch 'rosslagerwall/tree-build' 2013-09-16 12:29:48 -04:00
Ross Lagerwall
243386ccc2 rpcgen: Generate regress.gen.[c,h] in build rather than src dir
Currently an out-of-tree build will either write to the src dir or reuse
the existing regress.gen.[c,h].  But if building from a read-only git
tree (or if the git dir is cleaned), these files will not exist and the
build fails.  So write the files to the build dir.  If the system does
not have python, the regress.gen.[c,h] will be used from the src dir if
they exist.
2013-09-15 21:48:15 +02:00
Nick Mathewson
e193c959de test_evutil_rtrim: add another missing check. 2013-08-06 19:42:20 -04:00
Nick Mathewson
82b6956c1b Finalize tests: add a missing check 2013-08-06 19:39:35 -04:00
Nick Mathewson
f314900dfd DNS tests: add a missing check 2013-08-06 19:38:48 -04:00
Nick Mathewson
87cd6f0186 Fix some crash-on-fail cases in DNS regression tests
Found by coverity.
2013-08-06 19:35:56 -04:00
Nick Mathewson
eba4506abf Add missing check to test_evbuffer_file_segment_add_cleanup_cb 2013-08-06 19:33:45 -04:00
Nick Mathewson
776588468b Fix a logic error in test_evbuffer_freeze 2013-08-06 19:32:21 -04:00
Nick Mathewson
1104d0bee9 Fix a (failure-only) null dereference in the unit tests 2013-08-06 19:31:26 -04:00
Nick Mathewson
7080d55c49 Use void casts to suppress some "unchecked return value" warns 2013-08-06 19:28:53 -04:00
Maxime Henrion
fbc323b76b Add checks for evhttp_connection_get_server() in unit tests.
They validate that this function behave as expected; that is, it returns
NULL for outgoing connections, and returns the HTTP server object that
received the connection for incoming ones.
2013-07-31 21:55:19 -04:00
Mark Ellzey
4b3d5af8e2 Add function to fetch underlying ratelimit cfg
bufferevent_get_token_bucket_cfg() will return the struct ev_token_bucket_cfg
for a bufferevent if available.
2013-07-11 12:31:39 -04:00
Mobai Zhang
0fa107d8cb Added event_base_get_num_events() 2013-07-02 16:01:02 -04:00
Nick Mathewson
e1766a1b6d Actually use the log facility for reporting evdns problems.
Fixes issue #63.  Also refactors the evdns logging and log backend a
bit, so that it wastes a little less code.
2013-05-29 16:26:50 -04:00
Azat Khuzhin
7e876df71b Fix dns/leak_resume_send_err test.
Because we don't cancel request,
and want our callback to recieve DNS_ERR_SHUTDOWN,
we use deferred callback, and there was
- one extra malloc(),
  @see reply_schedule_callback()
- and one missing free
  @see request_finished() (req->handle->pending_cb = 1)
than we don't need to count in testleak_cleanup()

So just decrement allocated_chunks to 2,
like we already take care about it.
2013-05-13 19:56:00 +00:00
Azat Khuzhin
1cd9ff591d Add tests for evdns_base_resume().
- leak_resume
- leak_cancel_and_resume
- leak_resume_send_err
- leak_cancel_and_resume_send_err
2013-05-13 19:56:00 +00:00
Nick Mathewson
8ab612e396 Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) 2013-05-11 22:21:30 -04:00
Nick Mathewson
5ba8ab76e9 Fix test compilation with nmake: add the gdi.lib dependency
ACK: efekty
2013-05-10 21:38:26 -04:00
Nick Mathewson
85a40040d1 Add regress_finalize to makefile.nmake 2013-05-01 13:37:57 -04:00
Nick Mathewson
5bc290e247 Make http/connection_retry off-by-default 2013-05-01 10:04:08 -04:00
Nick Mathewson
9e3a99cad7 Fix a bug in fixing a bug in out-of-tree test-dumpevents 2013-04-30 20:09:52 -04:00
Nick Mathewson
b48c7bf8a6 Make regress_finalize work with malloc replacement disabled 2013-04-30 14:40:50 -04:00
Nick Mathewson
cbfc35f6b9 Fix some out-of-tree build bugs 2013-04-30 14:26:47 -04:00
Nick Mathewson
702c9aa403 Fix a bug in the new main/event_foreach test
It wasn't making sure that the events weren't internal.
2013-04-26 19:14:05 -04:00
Nick Mathewson
d5967397b0 More unit tests for initializing common timeouts.
Try with: misformed usecs in inputs, and with initializing common timeouts
from other common timeouts.
2013-04-26 17:51:33 -04:00
Nick Mathewson
f09629eac5 A test for event_get_assignment() 2013-04-26 17:46:33 -04:00
Nick Mathewson
30ea2910d5 Unit tests for event_base_gettimeofday_cached() and event_base_update_cache_time() 2013-04-26 17:37:15 -04:00
Nick Mathewson
0b096efee5 New tests for event_base_foreach_event()
Our dump-events code had exercised this a bit, but only via the
nonlocking backend. Also, nothing was checking the "Search for a
specific event" code.
2013-04-26 13:52:51 -04:00
Nick Mathewson
a153874d18 New test for active_later->active transition on event_active
When event_active is called, an active_later event is supposed to become
active now.  We had lacked a test for that.
2013-04-26 13:49:45 -04:00
Nick Mathewson
3555befd1c Merge branch '21_deadlock_fix_v2' 2013-04-26 12:27:05 -04:00
Nick Mathewson
25aac69780 Remove a no-longer-true XXXX comment. 2013-04-26 12:18:38 -04:00