Nick Mathewson
7f9678079f
Initial unit test for overlapped evbuffer usage. It's lame, but it doesn't crash any more.
...
svn:r1259
2009-04-30 20:48:40 +00:00
Nick Mathewson
16612eb936
Beef up the events in the last test a little.
...
svn:r1256
2009-04-30 19:20:42 +00:00
Nick Mathewson
ec1468832e
Oops: actually commit changes to build and use regress_iocp
...
svn:r1255
2009-04-30 19:05:43 +00:00
Nick Mathewson
f1090833b2
First tests for IOCP loop, and related fixes.
...
The fixes are: a shutdown mode that works, and a way to activate an
arbitrary event_overlapped.
svn:r1254
2009-04-30 19:04:44 +00:00
Nick Mathewson
b45cead762
Make environment-variable tests work on win32, which has only one method and lacks (un)setenv.
...
svn:r1253
2009-04-30 18:05:33 +00:00
Nick Mathewson
586aa46886
Unit test for disabling events with EVENT_NO*, and for EVENT_BASE_FLAG_IGNORE_ENV.
...
svn:r1247
2009-04-28 19:08:27 +00:00
Niels Provos
b228ff91b8
remove vararg macros for accessing evrpc structs
...
svn:r1243
2009-04-25 00:15:31 +00:00
Nick Mathewson
d70b080488
Make main/methods test pass on systems where only one backend exists.
...
svn:r1235
2009-04-23 18:08:42 +00:00
Nick Mathewson
1ad0326440
Fix win32 compilation issues.
...
svn:r1234
2009-04-23 18:04:50 +00:00
Nick Mathewson
8ba25b9ec7
Add missing regress_minheap.c file
...
svn:r1230
2009-04-23 05:20:08 +00:00
Nick Mathewson
5c104cef51
Add a randomized test for heap correctness.
...
svn:r1229
2009-04-23 00:33:37 +00:00
Nick Mathewson
df0617f289
Use signal.h, not sys/signal.h.
...
This is patch 2673214 from mmadia. It is correct, since we unconditionally
include signal.h in many other places, and only sometimes include sys/signal.h.
It is necessary to compile on Haiku, I'm told.
svn:r1228
2009-04-23 00:21:23 +00:00
Nick Mathewson
0068c98ad2
Make version test ignore the bottom byte of the version number.
...
svn:r1225
2009-04-23 00:01:14 +00:00
Nick Mathewson
b21be24545
Somehow free_active_base was using the socketpair, but not saying it needed it. How did this ever work?
...
svn:r1223
2009-04-23 00:00:55 +00:00
Nick Mathewson
1f9c9e5137
Add a missing "static".
...
svn:r1219
2009-04-22 15:38:50 +00:00
Nick Mathewson
133a015dba
Make sure the test case for mem_functions hits strdup too.
...
svn:r1218
2009-04-21 18:48:05 +00:00
Nick Mathewson
7f1855d064
Add a basic test for set_mem_functions
...
svn:r1216
2009-04-21 18:47:35 +00:00
Nick Mathewson
386279d051
Add a test for event_pending; especially the timeout part.
...
svn:r1214
2009-04-21 18:47:02 +00:00
Nick Mathewson
ff1f429510
Unit tests for event_base_once.
...
svn:r1213
2009-04-21 18:46:43 +00:00
Nick Mathewson
ea664bf29a
Refactor test wrappers to divide legacy items from useful stuff.
...
svn:r1212
2009-04-21 18:46:30 +00:00
Nick Mathewson
122e934e92
Add unit tests for version methods and feature-based backend selection
...
svn:r1211
2009-04-21 18:46:11 +00:00
Nick Mathewson
7cf8a7b0e0
Call the main testcases "main", not "legacy".
...
svn:r1210
2009-04-21 18:45:59 +00:00
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