test/regress_bufferevent.c


Log

Author Commit Date CI Message
Nick Mathewson 9f560bfa 2011-05-25T19:50:56 Use "_WIN32", not WIN32: it's standard and we don't need to fake it This patch was automatically generated with perl. Based on a patch by Peter Rosin.
Nick Mathewson 06a714ff 2011-05-25T16:51:25 Fix new warnings from GCC 4.6
Christopher Davis 34b84b97 2010-11-03T14:38:45 Fix more wn64 warnings.
Nick Mathewson e5c214a4 2010-10-14T13:16:41 Fix -Wsigned-compare warnings in test/*
Christopher Davis 499452f4 2010-08-28T02:44:11 IOCP-related unit test tweaks
Nick Mathewson 42090072 2010-09-06T15:47:07 Move the "function to getsockname() on a listener" to regress_testutils This reverts commit fab50488fcb741884ccdfa7b83643eac3e5c9cbf. The function was, on reflection, not important enough to break the feature freeze, since it's trivial to build on your own.
Nick Mathewson a97320ac 2010-09-03T18:48:31 Allow more than one copy of regression tests to run at once Mostly this was a matter of just removing all the hardwired ports in the test code. The http/connection_retry test is still a little screwy, though.
Nick Mathewson 743f8665 2010-08-23T11:48:46 Honor NDEBUG; build without warnings with NDEBUG; make NDEBUG always-off in unit test code
Nick Mathewson ec347b92 2010-07-07T16:45:03 Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional.
Nick Mathewson 17a8e2d7 2010-06-07T12:06:43 Add a function to retrieve the other side of a bufferevent pair
Nick Mathewson dfb75ab2 2010-05-12T15:38:28 Test the unlocked-deferred callback case of bufferevents
Sebastian Sjöberg 899c1dcc 2010-04-14T15:42:57 Replace EVUTIL_CLOSESOCKET macro with a function The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your source for POSIX. We might as well turn it into a function: an extra function call is going to be cheap in comparison with the system call. We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new evutil_closesocket() function. (commit message from email by Nick and Sebastian)
Nick Mathewson 274a7bd9 2010-03-13T00:55:39 Fix some memory leaks in the unit tests These don't matter except inasmuch as they give real memory leaks a place to hide. Found with valgrind
Nick Mathewson 0d047c3f 2010-03-13T00:29:15 Fix an obnoxious typo in the bufferevent_timeout_filter test We were using the same bufferevent as the child of two filtering parents, orphaning another. This made one get freed twice, and the other not at all. Possible fix for bug 2963306 spotted by Doug Cuthbertson.
Nick Mathewson 17efc1cd 2010-03-04T01:25:51 Update all our copyright notices to say "2010"
Nick Mathewson f3dfe462 2010-02-23T23:59:26 Use new timeval diff comparison function in bufferevent test
Nick Mathewson c02bfe12 2010-02-23T16:36:52 Add a test for timeouts on filtering bufferevents.
Nick Mathewson d3288293 2010-02-20T18:44:35 Provide consistent, tested semantics for bufferevent timeouts The different bufferevent implementations had different behavior for their timeouts. Some of them kept re-triggering the timeouts indefinitely; some disabled the event immediately the first time a timeout triggered. Some of them made the timeouts only count when the bufferevent was actively trying to read or write; some did not. The new behavior is modeled after old socket bufferevents, since they were here first and their behavior is relatively sane. Basically, each timeout disables the bufferevent's corresponding read or write operation when it fires. Timeouts are stopped whenever we suspend writing or reading, and reset whenever we unsuspend writing or reading. Calling bufferevent_enable resets a timeout, as does changing the timeout value.
Nick Mathewson e5bbd40a 2010-02-18T17:41:15 Clean up formatting: use tabs, not 8-spaces, to indent.
Nick Mathewson 4a5b5343 2009-12-23T07:48:43 Do not ignore bufferevent_enable(EV_READ) before bufferevent_connect(). Previously, we weren't remembering that we wanted to re-add the read event once the connect was finished. Now we are.
Nick Mathewson 07ce7f99 2009-11-18T21:17:00 Make our failing-connection bufferevent test more tolerant. I thought we had a way to do connect() that would never fail immediately, but always wait for a moment before failing. It turns out that on FreeBSD it can fail immediately. This is not FreeBSD's fault, or even a real bug anywhere but in the unit test. svn:r1549
Nick Mathewson d7d1f1da 2009-11-17T20:31:09 Move responsibility for IOCP callback into bufferevent_async. This patch from Chris Davis saves some callback depth, and adds proper ref-counting to bufferevents when there's a deferred evbuffer callback inflight. It could use a couple more comments to really nail down what its invariants are. svn:r1543
Nick Mathewson 784b8773 2009-11-06T21:46:57 We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H svn:r1516
Nick Mathewson ac633aeb 2009-11-05T21:22:23 Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons. svn:r1510
Nick Mathewson 86db1c85 2009-11-04T05:19:26 Commit ConnectEx code to get connect working with async bufferevents. This is code by Chris Davis, with changes to get the unit tests failing less aggressively. The unit tests for this code do not completely pass yet; Chris is looking into that. If they aren't passing by the next release, I'll turn off this code. svn:r1499
Nick Mathewson 5f1d6e64 2009-11-02T17:42:16 Add more IOCP tests. They might not pass yet. svn:r1487
Nick Mathewson 7b107249 2009-10-23T22:07:05 Fix my fix for the bufferevent_connect_fail() test. svn:r1460
Nick Mathewson fdd11c00 2009-10-21T19:21:05 Make the bufferevent_connect_fail test faster on OSX. It seems that connecting to a listener that is bound but not accepting or listening doesn't give a 'connection refused' error on OSX, but rather makes the connect() time out after 75 seconds. I couldn't find any way to make the timout shorter. Fortunately, closing the listener after a second or so makes the desired error occur after another second or so. svn:r1457
Nick Mathewson 4fbac2a5 2009-10-21T07:00:19 Test failing case of bufferevent_connect(). Code by Chris Davis. svn:r1455
Nick Mathewson 7c688dd9 2009-07-31T14:41:45 New function to expose bufferevent.enabled svn:r1401
Nick Mathewson 9cf4ee7e 2009-07-17T21:47:35 Fix a simple warning svn:r1362
Nick Mathewson c02b305a 2009-07-17T20:23:12 Trivial tests to exercise deferred and locking bufferevent code. These are done as variations of test_bufferevent_connect, since that one exercises event callbacks as well as read/write callbacks. The coverage for bufferevent.c is now up to about 87%, from about 70%. svn:r1358
Nick Mathewson 9c2ecba7 2009-07-17T18:42:12 Oops. -1 is an integer, not a pointer. svn:r1352
Nick Mathewson d6f2e199 2009-07-17T18:38:46 Unit tests for bufferevent_get(fd|_underlying) svn:r1351
Nick Mathewson bbd14de0 2009-06-11T17:55:08 Add sometimes-needed header to regress_bufferevent.c svn:r1325
Nick Mathewson 0b22ca19 2009-05-22T19:11:48 Use ev_ssize_t in place of ssize_t *everywhere*. svn:r1309
Nick Mathewson ed1bbc7a 2009-05-18T16:15:56 Tweak the evconnlistener interface a little. svn:r1295
Nick Mathewson 83f46e51 2009-05-13T20:36:56 Do not use the "evbuffer_" prefix to denote parts of bufferevents. This is a bit of an interface doozy, but it's really needed in order to be able to document this stuff without apologizing it. This patch does the following renamings: evbuffercb -> bufferevent_data_cb everrorcb -> bufferevent_event_cb EVBUFFER_(READ,WRITE,...) -> BEV_EVENT_(...) EVBUFFER_(INPUT,OUTPUT) -> bufferevent_get_(input,output) All the old names are available in event2/bufferevent_compat.h svn:r1283
Nick Mathewson 659d54d5 2009-05-05T02:59:26 Add new code to make and accept connections. This is stuff that it's easy to get wrong (as I noticed when writing bench_http), and that takes up a fair amount of space (see http.c). Also, it's something that we'll eventually want to abstract to use IOCP, where available. svn:r1272
Nick Mathewson a8f6d961 2009-04-17T06:56:09 Actually stop using EVBUFFER_LENGTH/DATA, and move them to buffer_compat.h svn:r1183
Nick Mathewson 23085c92 2009-04-10T15:01:31 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
Nick Mathewson 68d0139f 2009-04-07T04:49:25 Refactor the zlib and pthreads tests to appear in the regular tinytest tree structure. svn:r1141
Nick Mathewson f9e4e0f9 2009-02-03T18:28:53 Move bufferevent tests to regress_bufferevent.c file. svn:r1101
Nick Mathewson ea4b8724 2009-02-02T19:22:13 checkpoint work on big bufferevent refactoring svn:r1095