Nick Mathewson
e3e1153109
Unit tests for evbuffer callback manipulation
...
svn:r1090
2009-02-01 01:07:42 +00:00
Nick Mathewson
ca37fef951
Change evbuffer callbacks to use tinytest natively and never assert.
...
svn:r1088
2009-02-01 01:07:22 +00:00
Nick Mathewson
a30c9eb1ac
Move evbuffer tests into their own file.
...
svn:r1087
2009-02-01 01:07:12 +00:00
Nick Mathewson
ff7a5e1272
slightly more coverage for evutil.
...
svn:r1086
2009-01-31 19:32:20 +00:00
Nick Mathewson
12e8db5b23
Convert evtag test.
...
svn:r1085
2009-01-31 18:36:47 +00:00
Nick Mathewson
5831d11a42
Move rpc_test to regress_rpc.
...
svn:r1084
2009-01-31 18:36:37 +00:00
Nick Mathewson
fa6ae16992
Convert RPC suite. There are still some places it can exit(1), but those always run forked, so no big deal.
...
svn:r1083
2009-01-31 18:36:24 +00:00
Nick Mathewson
d9628ef4ff
Add missing initializers
...
svn:r1082
2009-01-31 18:36:08 +00:00
Nick Mathewson
eac75f91e4
Port DNS tests.
...
svn:r1081
2009-01-31 07:32:14 +00:00
Nick Mathewson
e6ba208ba3
Tinytest update: mostly just to allow test skipping.
...
svn:r1080
2009-01-31 07:32:00 +00:00
Nick Mathewson
4ec690d35e
Rename a couple of http tests so they all end with _test. This lets us simplify the naming.
...
svn:r1077
2009-01-31 05:45:16 +00:00
Nick Mathewson
153093ecc3
Port the HTTP unit tests. Most are still legacy (since they use test_ok so much), but at least they no longer exit(1) on failure
...
svn:r1076
2009-01-30 17:44:13 +00:00
Nick Mathewson
241690b230
Move util tests to regress_util.c
...
svn:r1075
2009-01-30 17:43:59 +00:00
Nick Mathewson
4e9470b481
Convert test_evutil_strtoll to new framework.
...
svn:r1074
2009-01-30 17:43:48 +00:00
Nick Mathewson
a8203b3490
Refactor unit tests using my spiffy new "tinytest" framework.
...
The big win here is that we can get process-level isolation.
This has been tested to work okay on at least Linux and Win32. Only
the tests in regress.c have been converted wrapped in the new wrapper
functions; the others are still on the old system.
svn:r1073
2009-01-29 23:19:57 +00:00
Nick Mathewson
cc7a53c152
fix signed/unsigned warning in unit tests. can we just use "char*" on all new APIs? this void/unsigned char*/char* business is awful.
...
svn:r1071
2009-01-29 18:15:36 +00:00
Nick Mathewson
7dd362b158
Have util-internal.h define socklen_t if we need it, and include it appropriately. This fixes win32 compilation.
...
svn:r1070
2009-01-29 15:09:24 +00:00
Niels Provos
66b2a7ffb7
test evbuffer_add_reference
...
svn:r1068
2009-01-29 03:20:40 +00:00
Nick Mathewson
b85b710cf5
Update copyright statements to reflect the facts that:
...
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039
Replace all use of config.h with event-config.h.
...
svn:r1064
2009-01-27 22:30:46 +00:00
Nick Mathewson
9993137cbb
Remove all trailing whitespace in all the source files.
...
svn:r1063
2009-01-27 21:10:31 +00:00
Niels Provos
3065389973
make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov
...
svn:r1062
2009-01-27 16:35:28 +00:00
Nick Mathewson
f20902a290
Remove evperiodic_assign and its related parts: its functionality is subsumed by EV_PERSIST timeouts.
...
svn:r1040
2009-01-22 17:56:15 +00:00
Nick Mathewson
dc1526e0da
Fix warnings on compile: make static functions static.
...
svn:r1037
2009-01-22 17:48:16 +00:00
Niels Provos
fe72c885d9
fix signal processing for non-kqueue backends; when a signal callback delivers a signal; from Alexander Drozdov
...
svn:r1035
2009-01-22 06:23:14 +00:00
Niels Provos
a077fb8c09
rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
...
svn:r1033
2009-01-22 02:47:35 +00:00
Niels Provos
56ea4687a5
Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
...
svn:r1032
2009-01-22 02:33:38 +00:00
Nick Mathewson
309fc7c4ad
New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
...
svn:r1031
2009-01-21 07:51:25 +00:00
Nick Mathewson
9935d5b01e
Fix win32 compilation. Surprisingly, unit tests pass too.
...
svn:r1002
2009-01-13 21:39:32 +00:00
Nick Mathewson
169321c9e6
Rename four internal headers to follow the -internal.h convention.
...
svn:r1000
2009-01-13 20:26:37 +00:00
Nick Mathewson
980bcd68f7
Work better with platforms that do not have ipv6 structures, or that do not have sin_len fields, etc.
...
svn:r986
2009-01-02 21:21:58 +00:00
Nick Mathewson
cfbd168008
Add another function to parse the common address:port combination formats into a sockaddr.
...
svn:r984
2009-01-02 20:46:26 +00:00
Nick Mathewson
0d9d5cfe22
New functions in evutil to clone inet_pton and inet_ntop, with tests.
...
Adapted from Tor code.
svn:r983
2009-01-02 20:46:12 +00:00
Niels Provos
87be18daa1
implement evdns_cancel_request; test one of the new evdns_base functions
...
svn:r980
2008-12-25 16:25:37 +00:00
Niels Provos
eed234519c
forgot to re-enable dns tests
...
svn:r978
2008-12-25 16:20:45 +00:00
Niels Provos
d776f8462b
deprecate the usage of signal_{add,del,set} and name it evsignal_{add,del,set} instead; move the old definitions to compat
...
svn:r973
2008-12-23 22:23:37 +00:00
Niels Provos
02b2b4d1be
Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal.
...
svn:r972
2008-12-23 16:37:01 +00:00
Niels Provos
ebcf5efcfe
fix memory leaks in the regression tools; add another close detection test that validates that there are no dangling connections on the server
...
svn:r969
2008-12-19 22:42:51 +00:00
Nick Mathewson
dd73168556
Implement increased DSN-poisoning resistance via the 0x20 hack.
...
svn:r958
2008-12-03 20:09:13 +00:00
Niels Provos
ffb3966ec2
minor compilation and regresson fixes; from Frank Denis
...
svn:r952
2008-11-27 19:34:07 +00:00
Niels Provos
c968eb3e01
Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me.
...
svn:r928
2008-08-19 11:26:47 +00:00
Niels Provos
3b24f4eedc
another fix; we also need to remove the signal event from the queue
...
svn:r918
2008-07-25 00:48:30 +00:00
Niels Provos
a4e2f52a44
add a signal and free the base for reinit test
...
svn:r915
2008-07-20 23:31:28 +00:00
Niels Provos
f7e61870e9
support multiple events listening on the same signal; make signals regular events that go on the same event queue
...
svn:r901
2008-07-11 15:49:04 +00:00
Niels Provos
5512be0176
fix a bug where deleting signals with kqueue would delete subsequent adds
...
svn:r899
2008-07-11 15:15:04 +00:00
Niels Provos
df97fca9ca
From Scott Lamb:
...
* Allow the user to set the Content-Length: then stream a reply.
This is useful for large requests of a known size. Added unit test.
* Don't send a response body on HEAD requests, 1xx status codes, 204
status codes, or 304 status codes, as described in RFC 2616 section
4.3. (Doing otherwise causes problems - in particular, if a 304 has a
chunked body (even an empty one), Safari 3.1.1 issues and then fails
the next request on the connection with the non-sequitur error message
"Too many HTTP redirects"!)
* Specify a default Content-Type: when a response body is required, not
when we have data in the response buffer by the time we make the
header. (I.e., do this on evhttp_send_reply_start() for consistency.)
* Don't expect a body in response to HEAD requests.
svn:r898
2008-07-02 06:08:16 +00:00
Niels Provos
707f67849a
reject negative content-length headers
...
svn:r894
2008-07-02 04:22:48 +00:00
Niels Provos
cb7c3bd671
support multi-line http headers; based on a patch from Moshe Litvin
...
svn:r890
2008-06-29 01:30:06 +00:00
Niels Provos
9998c0cbc8
correct handling of trailing headers in chunked replies; from Scott Lamb.
...
svn:r887
2008-06-26 00:40:57 +00:00
Niels Provos
ac0c7e2c7d
skip connection-retry test on windows
...
svn:r869
2008-06-25 00:58:08 +00:00