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
Azat Khuzhin
9ec88bdf5f
Add regress test ipv6_for_domain.
...
Written for commit 71e709c7829275a594f767b27468b1b52e8b5bb9.
Fix ipv6 support for http. When URL contain domain, not IP address.
2013-01-27 02:17:02 +04:00
Nick Mathewson
c142069098
Fix a bug when running "make verify" out-of-tree
2012-11-19 09:07:13 -05:00
Nick Mathewson
173d782345
Fix a gcc warning in rtrim test
2012-11-18 01:40:33 -05:00
Nick Mathewson
f38e078868
Make ssl version check in unit tests work
2012-11-18 01:36:03 -05:00
Nick Mathewson
e3b2e0869e
Add an event_remove_timer() to remove timer on an event without deleting it
2012-11-16 16:43:17 -05:00
Nick Mathewson
5a9a014189
Fix a couple of compile warnings in the unit tests
2012-11-16 16:17:07 -05:00
Nick Mathewson
c6ff381270
Remove internal ws from multiline http headers correctly
...
According to RFC2616:
All linear white space, including folding, has the same semantics
as SP. A recipient MAY replace any linear white space with a single
SP before interpreting the field value or forwarding the message
downstream.
2012-11-16 11:38:53 -05:00
Nick Mathewson
ac42519769
Remove trailing tabs in HTTP headers as well.
2012-11-16 11:29:34 -05:00
Nick Mathewson
aa59d805f5
Clean up rtrim implementation
...
If I understand the C standard correctly, you can't actually point
at a position immediately _before_ the start of an object; only at the
position immediately after.
According to J.2 in the standard, in its big list of undefined behavior:
"The behavior is undefined in the following circumstances:
...
— Addition or subtraction of a pointer into, or just beyond, an
array object and an integer type produces a result that does not
point into, or just beyond, the same array object (6.5.6)."
So we've got to fix rtrim to not do that. Also, make it unit tested,
and give it an evutil_*_ name.
2012-11-16 11:13:29 -05:00
Nick Mathewson
efb644ed87
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
test/rpcgen_wrapper.sh
2012-11-16 10:29:37 -05:00
Nick Mathewson
f3009e48c7
Make rpcgen_wrapper.sh work on systems without a "python2" binary
2012-11-16 10:28:19 -05:00
Nick Mathewson
4343edf3c6
Add a unit test in which an event is created with event_base_once() but never fires
2012-11-16 10:17:34 -05:00
Nick Mathewson
1f5a48d1d0
Merge remote-tracking branch 'origin/patches-2.0'
2012-11-15 11:45:12 -05:00
Nick Mathewson
ac009f9245
Warn when openssl version in unit test mismatches compiled version.
2012-11-15 11:43:45 -05:00
Nick Mathewson
c2f30863e2
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.
2012-11-15 11:43:45 -05:00
Nick Mathewson
1d9d5110a4
Use the same CFLAGS for openssl when building unit tests as with libevent
2012-11-15 11:41:36 -05:00
Nick Mathewson
64051b903a
Clean up unit test for evbuffer_file_segment_add_cleanup_cb a little
2012-11-06 17:42:54 -05:00
yangacer
e9f8febace
Add a new callback to get called on evbuffer_file_segment free
2012-11-06 17:42:54 -05:00
Nick Mathewson
56e48c1019
Fix a few mingw64 incompatibilities introduced since 2.0
2012-11-02 10:58:02 -04:00