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
Nick Mathewson
9d893c97fa
Add some verbose notes to bufferevent unit tests
2013-04-26 12:18:07 -04:00
Nick Mathewson
8eedeabe50
Implement event_finalize() and related functions to avoid certain deadlocks
2013-04-26 12:18:07 -04:00
Nick Mathewson
b1b054f064
Make all tests pass under EVENT_DEBUG_MODE=1
...
The fix was easy: the tests that were failing were those tests that
also enabled debug mode themselves. So, let them know when
EVENT_DEBUG_MODE is on, so they won't do that.
2013-04-26 12:12:08 -04:00
Nick Mathewson
b3aca5d96c
Merge branch '21_http_error_cb_squashed'
2013-04-25 15:13:24 -04:00
Azat Khuzhin
54cc800536
Drop extra header http_struct.h from regress_http.c
2013-04-25 15:12:20 -04:00
Azat Khuzhin
862c217a29
Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test()
2013-04-25 15:12:20 -04:00
Azat Khuzhin
7b077194cc
Add new error_cb for actual reporting of HTTP request errors.
...
It is useful to know why you callback called with NULL (i.e. it failed),
for example if you set max_body with evhttp_connection_set_max_body_size()
you must know that it failed because of body was longer than this size.
(Commit message tweaked by Nick)
2013-04-25 15:11:44 -04:00
Nick Mathewson
1c3147f5e7
Add a test with an active_later event at event_base_free time.
2013-04-10 18:03:16 -04:00
Nick Mathewson
2fad0f3d52
Add an environment variable (EVENT_DEBUG_MODE) to run unit tests in debug mode
...
Not all tests currently pass with debug mode on.
2013-04-05 15:06:54 -04:00
Nick Mathewson
f935e2159a
build test/test-script.sh on systems with a less-featureful $<
2013-03-15 09:33:28 -04:00
Nick Mathewson
787fd7489f
Make --disable-libevent-regress work again
2013-03-15 09:33:13 -04:00
Azat Khuzhin
13676535c8
Test: decoding just part of string with evhttp_decode_uri_internal()
2013-03-01 12:02:54 +04:00
Patrick Pelletier
c9ad3af229
test filling up the hash table a bit
2013-02-25 20:13:01 -08:00
Patrick Pelletier
2078e9b46a
make sure caching works, and we don't leak memory
2013-02-14 20:26:38 -08:00
Patrick Pelletier
729651260d
a program to print out the error strings for winsock errors
2013-02-14 18:22:12 -08:00
Nick Mathewson
9709461457
Merge remote-tracking branch 'origin/patches-2.0'
2013-02-14 14:13:11 -05:00
Greg Hazel
b618204216
fix #73 and fix http_connection_fail_test to catch it
2013-02-14 09:54:56 -08:00
Nick Mathewson
96150dd0c6
Unit test for event_remove_timer with EV_PERSIST.
...
Patch from dcicppin on sourceforge.
2013-02-13 11:41:11 -05:00
Nick Mathewson
74e52db45d
Merge remote-tracking branch 'ppelleti/nmake-clean-exes'
2013-02-11 11:25:25 -05:00
Nick Mathewson
2863c83700
Avoid using $(top_srcdir) in TESTS.
...
Newer automakes don't like this.
2013-02-08 22:10:05 -05:00
Nick Mathewson
a55514eeed
Avoid using top_srcdir in TESTS-new automakes do not like this
2013-02-08 22:08:18 -05:00
Patrick Pelletier
974bfa0782
remove all exes on "make clean", not just regress.exe
2013-02-07 17:55:36 -08:00
Nick Mathewson
2ecd894725
Merge pull request #39 from azat/fix-http-for-ipv6
...
Fix ipv6 support for http. When URL contain domain, not IP address.
2013-02-04 13:49:08 -08:00
Nicholas Heath
0dda56a48e
Preliminary changes for Minix3.
2013-02-04 13:21:05 -05:00