1243 Commits

Author SHA1 Message Date
Nick Mathewson
c119f2416c Fix a dead-code warning in unit tests. CID 1193548 2014-09-18 11:54:04 -04:00
Nick Mathewson
37390574b0 Fix a use-after-free in unit tests. CID 752027 2014-09-18 11:52:16 -04:00
Nick Mathewson
c243dbf4c8 Merge pull request #168 from ufo2243/master
make bufferevent_getwatermark api more robust
2014-09-18 11:44:11 -04:00
Nick Mathewson
35f107de92 Merge remote-tracking branch 'origin/patches-2.0' 2014-09-18 11:36:08 -04:00
Maks Naumov
79800df7c7 regress_buffer: fix 'memcmp' compare size 2014-09-18 11:33:20 -04:00
Nick Mathewson
73615a3723 Merge pull request #118 from azat/http-forward-family-to-bufferevent
Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
2014-09-18 11:31:52 -04:00
Nick Mathewson
08c88ea563 use correct tt macro for pointer compare 2014-09-18 11:28:19 -04:00
Nick Mathewson
afce2721c2 Merge pull request #128 from azat/tests-disable-when-inactive-v5
Some tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE flag
2014-09-18 11:25:27 -04:00
ufo2243
a21e5108c2 make bufferevent_getwatermark api more robust 2014-09-12 11:51:59 +08:00
Nick Mathewson
9f3a8acfa8 Merge pull request #153 from azat/tests-simplestsignal
test/regress: add simplestsignal: to track reorder bugs separately
2014-08-29 14:38:09 -04:00
Nick Mathewson
f691389e82 Change return type of evutil_load_windows_system_library_ to HMODULE
Noted by Miles Chan as issue #146
2014-08-29 14:28:09 -04:00
Azat Khuzhin
b897beff6a test/regress: add simplestsignal: to track reorder bugs separately 2014-06-29 17:39:33 +04:00
Nick Mathewson
8da5a1864c Update to a more recent tinytest_macros.
This one has less of a tendency to suppress important type warnings.
2014-05-08 13:21:49 -04:00
Azat Khuzhin
5ca9e97ed0 regress dns: drop alarm() (since windows don't have it) 2014-04-11 18:50:10 +04:00
Azat Khuzhin
fea86a64c5 evdns: add regress test for flag EVDNS_BASE_DISABLE_WHEN_INACTIVE without ns 2014-04-10 01:37:12 +04:00
Azat Khuzhin
ad0493eebf evdns: add regress for EVDNS_BASE_DISABLE_WHEN_INACTIVE base flag 2014-04-10 01:11:03 +04:00
Azat Khuzhin
3fbf3cc908 test/http: add regress test for set family to AF_INET6 2014-03-27 00:50:04 +04:00
Azat Khuzhin
42aefeb0af test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC 2014-03-27 00:50:04 +04:00
Azat Khuzhin
177b8a7ce8 test: add family argument for http_connection_test_() 2014-03-27 00:49:58 +04:00
Nick Mathewson
6066f985cc Merge pull request #121 from azat/dns-regress-leaks
regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests
2014-03-26 11:02:52 -04:00
Azat Khuzhin
2fdc5f299f regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests 2014-03-23 15:12:29 +04:00
Trond Norbye
dc82c8d372 Renamed sin to saddr due to name conflict
During building on MSVC 2013 I got a compiler error by a
type conflict for sin:

test-fdleak.c(60) : error C2365: 'sin' : redefinition; previous definition was 'function'
test-fdleak.c(134) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(134) : error C2198: 'evconnlistener_new_bind' : too few arguments for call
test-fdleak.c(148) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(148) : error C2168: 'memcpy' : too few actual parameters for intrinsic function
test-fdleak.c(149) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(212) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(212) : error C2198: 'bufferevent_socket_connect' : too few arguments for call
test-fdleak.c(239) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(239) : error C2168: 'memset' : too few actual parameters for intrinsic function
test-fdleak.c(240) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(241) : error C2224: left of '.sin_addr' must have struct/union type
test-fdleak.c(242) : error C2224: left of '.sin_port' must have struct/union type

The simplest solution to this problem would be to rename
the variable.
2014-03-21 14:26:10 +01:00
Nick Mathewson
6a1c4d501b Correctly skip ipv6 http test on systems without ipv6 2014-03-18 18:36:32 -04:00
Nick Mathewson
e5302ac716 Remove integer-overflow unit tests
There's not much point checking undefined behavior.
2014-03-18 12:35:39 -04:00
Nick Mathewson
58fc9b6c0a Fix ubsan warnings when parsing ipv4/ipv6 addrs
left-shifting a one-byte integer by 24 invokes undefined behavior.
Let's not do that.
2014-03-18 11:35:50 -04:00
Nick Mathewson
860c71c892 Fix an illegal read error in the evbuffer_add_reference tests
Found with AddressSanitizer
2014-03-18 11:13:45 -04:00
Nick Mathewson
2578ec14f5 Avoid double-close paths in http tests
Coverity spotted that there were some paths through the test
functions that would double-close some sockets.
2014-03-13 10:46:59 -04:00
Nick Mathewson
b6f15ccea6 Add missing include to regress_finalize.h 2014-03-12 18:19:07 -04:00
Nick Mathewson
21477e408f Skip http/ipv6_for_domain test when we have no ipv6 support 2014-03-12 18:13:19 -04:00
Nick Mathewson
4947c1852f Heap-allocate zlib data structure in regress_zlib tests 2014-03-12 14:29:15 -04:00
Nick Mathewson
7a80476768 Update to the latest version of tinytest
This brings us up to tinytest 709a36ba63ff16d8
2014-03-06 18:09:00 -05:00
Nick Mathewson
239d8345be Fix 'make distcheck' by adding regress.gen.[ch] to DISTCLEANFILES
Patch from Harlan Stenn.
2014-03-06 10:18:09 -05:00
Joakim Soderberg
e212c5486d Check for OSX when checking for clang. 2014-01-22 13:19:49 +01:00
Nick Mathewson
5c142a7ee9 Merge remote-tracking branch 'origin/pr/98' 2014-01-21 14:53:47 -05:00
Nick Mathewson
4cb44fdf56 Merge remote-tracking branch 'joakimsoderberg/new_cmake'
Conflicts:
	sample/https-client.c
2014-01-21 14:26:01 -05:00
Nick Mathewson
c2076824a3 Fix a c90 warning 2014-01-21 12:21:37 -05:00
Joakim Söderberg
4e1439588f Change all uses of WIN32 to _WIN32 2014-01-21 11:30:27 +01:00
Diego Giagio
b1b69ac7c1 Implemented EV_CLOSED event for epoll backend (EPOLLRDHUP).
- Added new EV_CLOSED event - detects premature connection close
  by clients without the necessity of reading all the pending
  data. Does not depend on EV_READ and/or EV_WRITE.

- Added new EV_FEATURE_EARLY_CLOSED feature for epoll.
  Must be supported for listening to EV_CLOSED event.

- Added new regression test: test-closed.c

- All regression tests passed (test/regress and test/test.sh)

- strace output of test-closed using EV_CLOSED:
    socketpair(PF_LOCAL, SOCK_STREAM, 0, [6, 7]) = 0
    sendto(6, "test string\0", 12, 0, NULL, 0) = 12
    shutdown(6, SHUT_WR)                    = 0
    epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0
    epoll_wait(3, {{EPOLLRDHUP, {u32=7, u64=7}}}, 32, 3000) = 1
    epoll_ctl(3, EPOLL_CTL_MOD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...})
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYM...
    write(1, "closed_cb: detected connection close "..., 45) = 45
2014-01-17 23:20:42 -02:00
Joakim Soderberg
24d646666b Fix so that old nmake project still builds. 2014-01-14 17:53:47 +01:00
Nick Mathewson
d240328d60 Fix even more coverity warnings. 2014-01-08 13:02:37 -05:00
Nick Mathewson
860767e841 Fix a couple of compilation warnings in regress_http.c 2014-01-08 12:46:09 -05:00
Nick Mathewson
544cf8888a Whoops; fix compilation in bench.c 2014-01-08 11:58:50 -05:00
Nick Mathewson
ff7f739685 Fix coverity warnings in benchmark tools.
Again, not harmful, but best to stay warning-free.
2014-01-08 11:54:56 -05:00
Nick Mathewson
867f401f9b Fix a pile of coverity warnings in the unit tests
Most of these problems can only trigger when the tests fail, but it's
good hygiene to keep the code warning-free in any case.
2014-01-08 11:51:22 -05:00
Nick Mathewson
8d15f57f61 Merge remote-tracking branch 'asweeny86/on-complete-cb' 2014-01-07 16:59:26 -05:00
Andrew Sweeney
b85f398704 Update unit test to make sure that the callback happens after the output data is written 2014-01-06 21:19:15 -05:00
Nick Mathewson
f9e091bf4e Merge remote-tracking branch 'asweeny86/event-count-max' 2014-01-06 12:11:30 -05:00
Andrew Sweeney
b083ca0551 Provide on request complete callback facility
This patch provides the ability to receive a callback on the completion of a
request.  The callback takes place immediately before the request's resources
are released.
2014-01-05 20:35:46 -05:00
Andrew Sweeney
26230a2d21 Added unit test for max event counts 2014-01-05 16:30:35 -05:00
Nick Mathewson
b4ef3def6f Merge remote-tracking branch 'mistotebe/bufferevent_trigger' 2013-12-24 10:33:58 -05:00