12 Commits

Author SHA1 Message Date
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
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
Ross Lagerwall
243386ccc2 rpcgen: Generate regress.gen.[c,h] in build rather than src dir
Currently an out-of-tree build will either write to the src dir or reuse
the existing regress.gen.[c,h].  But if building from a read-only git
tree (or if the git dir is cleaned), these files will not exist and the
build fails.  So write the files to the build dir.  If the system does
not have python, the regress.gen.[c,h] will be used from the src dir if
they exist.
2013-09-15 21:48:15 +02:00
Nick Mathewson
8eedeabe50 Implement event_finalize() and related functions to avoid certain deadlocks 2013-04-26 12:18:07 -04:00
Nick Mathewson
f935e2159a build test/test-script.sh on systems with a less-featureful $< 2013-03-15 09:33:28 -04:00
Nick Mathewson
787fd7489f Make --disable-libevent-regress work again 2013-03-15 09:33:13 -04:00
Nick Mathewson
2863c83700 Avoid using $(top_srcdir) in TESTS.
Newer automakes don't like this.
2013-02-08 22:10:05 -05:00
Nick Mathewson
1d9d5110a4 Use the same CFLAGS for openssl when building unit tests as with libevent 2012-11-15 11:41:36 -05:00
Nick Mathewson
1e3123dae1 Fix handling of no-python case for nonrecursive make 2012-08-28 16:15:14 -04:00
Nick Mathewson
607a8ff9df Be quiet when making regress.gen.[ch] 2012-08-28 16:14:38 -04:00
Nick Mathewson
371a1237d0 Make quiet build even quieter 2012-08-28 16:07:56 -04:00
Nick Mathewson
6cdfeebebc Rename subordinate Makefile.ams to include.am 2012-08-28 16:01:14 -04:00