Nick Mathewson
1bb8e010f9
Format microseconds correctly in bench_httpclient
...
svn:r1209
2009-04-21 16:17:59 +00:00
Nick Mathewson
eda27f9557
Update copyright notices, add some missing license statements
...
svn:r1208
2009-04-19 20:54:12 +00:00
Nick Mathewson
4d8919ec44
Do not try to double-free the nameserver in regression test
...
svn:r1202
2009-04-19 01:58:26 +00:00
Nick Mathewson
b182ed765e
More tweaks to http stress-tester
...
svn:r1201
2009-04-18 18:28:18 +00:00
Nick Mathewson
e4f24219ee
Add a new bench_httpclient for a trivial codecon demo.
...
svn:r1198
2009-04-18 00:12:52 +00:00
Nick Mathewson
b346038724
Even _more_ recent tinytest, designed to give better help output.
...
svn:r1192
2009-04-17 06:58:18 +00:00
Nick Mathewson
812800629b
Add the latest tinytest. This one supports a --terse flag and a --no-fork flag, and outputs nicer.
...
svn:r1190
2009-04-17 06:57:52 +00:00
Nick Mathewson
a8f6d961eb
Actually stop using EVBUFFER_LENGTH/DATA, and move them to buffer_compat.h
...
svn:r1183
2009-04-17 06:56:09 +00:00
Niels Provos
30648529e8
have evhttp_set_cb return an int; -1 on failure, 0 on success; this is better than returning a pointer
...
svn:r1179
2009-04-17 01:03:07 +00:00
Nick Mathewson
4e8cdc6f08
Fix two windows compilation bugs.
...
svn:r1171
2009-04-13 18:23:02 +00:00
Niels Provos
d475fb5861
http benchmark: add a way to change the size of the buffer; also use add_reference
...
svn:r1158
2009-04-12 00:38:31 +00:00
Nick Mathewson
23085c9247
Add a linked-pair abstraction to bufferevents.
...
The new bufferevent_pair abstraction works like a set of buferevent_sockets
connected by a socketpair, except that it doesn't require a socketpair,
and therefore doesn't need to get the kernel involved.
It's also a good way to make sure that deferred callbacks work. It's a good
use case for deferred callbacks: before I implemented them, the recursive
relationship between the evbuffer callback and the read callback would
make the unit tests overflow the stack.
svn:r1152
2009-04-10 15:01:31 +00:00
Niels Provos
ce146eb1cb
Fix parsing of queries where the encoded queries contained \r, \n or +
...
svn:r1148
2009-04-10 05:43:45 +00:00
Niels Provos
6dece3e980
revert last commit; git user error
...
svn:r1147
2009-04-10 05:22:15 +00:00
Niels Provos
f43f1d14c5
initial version of query decoding patch
...
svn:r1146
2009-04-10 05:18:18 +00:00
Nick Mathewson
747331d164
Add freeze support to evbuffers.
...
From the documentation:
Prevent calls that modify an evbuffer from succeeding. A buffer may
frozen at the front, at the back, or at both the front and the back.
If the front of a buffer is frozen, operations that drain data from
the front of the buffer, or that prepend data to the buffer, will
fail until it is unfrozen. If the back a buffer is frozen, operations
that append data from the buffer will fail until it is unfrozen.
We'll use this to ensure correctness on an evbuffer when we're waiting
for an overlapped IO call to finish.
svn:r1143
2009-04-08 03:04:39 +00:00
Nick Mathewson
68d0139f19
Refactor the zlib and pthreads tests to appear in the regular tinytest tree structure.
...
svn:r1141
2009-04-07 04:49:25 +00:00
Nick Mathewson
d2e9caa6fc
Fix evdns_cancel to alert callback and free associated RAM.
...
Also, we add a test to make sure evdns_cancel is working properly.
svn:r1139
2009-04-06 20:38:19 +00:00
Nick Mathewson
f1b1bad415
Make the new evbuffer callbacks use a new struct-based interface.
...
The old interface would fail pretty hard when we had to batch up
multiple adds and drains in a single call.
svn:r1131
2009-04-03 14:27:03 +00:00
Nick Mathewson
f90500a5df
Add a new improved search function.
...
The old evbuffer_find didn't allow iterative searching, and forced us
to repack the buffer completely every time we searched in it. The
new evbuffer_search addresses both of these. As a side-effect, the
evbuffer_find implementation is now a little more efficient.
svn:r1130
2009-04-03 01:21:36 +00:00
Nick Mathewson
0afb1f7ffb
Glibc mkstemp requires exactly 6 Xs.
...
svn:r1129
2009-04-01 16:08:34 +00:00
Nick Mathewson
73094d5952
Make tmpfile code compile without warnings
...
svn:r1123
2009-02-13 13:43:35 +00:00
Niels Provos
79b7799bd1
a simple test for evbuffer_add_file
...
svn:r1122
2009-02-13 01:42:59 +00:00
Nick Mathewson
ec35eb5520
Make threading functions global, like the mm_ functions. Use the libevent_pthread.la library in regress_pthread.
...
svn:r1121
2009-02-12 22:19:54 +00:00
Nick Mathewson
acaf65c359
Make evutil_parse_sockaddr_port give a useful socket-length output.
...
svn:r1118
2009-02-11 17:23:32 +00:00
Nick Mathewson
e7fd1034cf
Test some formerly untested prepend cases of evbuffer. Now evbuffer coverage is over 80 percent.
...
svn:r1108
2009-02-10 19:39:03 +00:00
Nick Mathewson
9e3e7b360d
More unit tests for evbuffer_add_reference to make sure that certain interleaved data patterns work; that free invokes callback; that callbacks are not invoked too early or later; etc.
...
svn:r1107
2009-02-10 19:38:54 +00:00
Nick Mathewson
71604d85be
Remove some needless includes
...
svn:r1104
2009-02-10 19:38:25 +00:00
Nick Mathewson
f9e4e0f98e
Move bufferevent tests to regress_bufferevent.c file.
...
svn:r1101
2009-02-03 18:28:53 +00:00
Nick Mathewson
ea11f8195f
Compile http_connection_retry_test, but mark it skipped on win32.
...
svn:r1099
2009-02-02 22:17:32 +00:00
Nick Mathewson
ea4b8724c0
checkpoint work on big bufferevent refactoring
...
svn:r1095
2009-02-02 19:22:13 +00:00
Nick Mathewson
2e3f0f682a
Enable the edge-triggered test again
...
svn:r1092
2009-02-01 02:20:16 +00:00
Nick Mathewson
8d3a10f8f1
Support temporarily suspending an evbuffer callback. This is different from disabling the callback, since we want to process changes, but not just yet.
...
svn:r1091
2009-02-01 01:43:58 +00:00
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