This patch splits common part out to avoid copy-paste from the
- bufferevent_openssl.c
- bufferevent_mbedtls.c
It uses VFS/bufferevent-like approach, i.e. structure of callbacks.
libevent is lacking a scalable backend on Windows. Let's leverage the wepoll
library until Windows comes up with an epoll/kqueue compete user mode API.
- All regress tests pass for standard wepoll
- These 2 tests fail intermittently for changelist wepoll, so disabling
changelist wepoll for now
http/cancel_inactive_server
http/stream_in
- verify target on Windows runs tests for both wepoll and win32 backends
- wepoll backend preferred over win32 backend
- wepoll version 1.5.6
v2: cleaner backend abstraction. Disallow wepoll on MinGW/Cygwin.
v3: Add wepoll.h to dist
v4: Make sure wepoll source files are excluded from cygwin/mingw builds
v5: Keep win32 as default backend on windows.
v6: Include wepoll in mingw builds. Verified that regress tests pass w/ WEPOLL backend.
v7: Enable wepoll on mingw when building with cmake
v8: Add wepoll testrunner for autotools test target
When I run make check via automake with a version of 1.12.6 or lower, I got this error:
/bin/sh: line 9: ./test_runner_epoll: No such file or directory
FAIL: test_runner_epoll
/bin/sh: line 9: ./test_runner_select: No such file or directory
FAIL: test_runner_select
/bin/sh: line 9: ./test_runner_kqueue: No such file or directory
FAIL: test_runner_kqueue
/bin/sh: line 9: ./test_runner_evport: No such file or directory
FAIL: test_runner_evport
/bin/sh: line 9: ./test_runner_devpoll: No such file or directory
FAIL: test_runner_devpoll
/bin/sh: line 9: ./test_runner_poll: No such file or directory
FAIL: test_runner_poll
/bin/sh: line 9: ./test_runner_win32: No such file or directory
FAIL: test_runner_win32
/bin/sh: line 9: ./test_runner_timerfd: No such file or directory
FAIL: test_runner_timerfd
/bin/sh: line 9: ./test_runner_changelist: No such file or directory
FAIL: test_runner_changelist
/bin/sh: line 9: ./test_runner_timerfd_changelist: No such file or directory
FAIL: test_runner_timerfd_changelist
Open the Makefile generated by command ./autogen.sh && ./configure
I can see the errors are caused by this line:
if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then
$${dir}$$tst will expand to ./test_runner_epoll, but test_runner_epoll is only a target in test/include.am,
not a file, so it print:
/bin/sh: line 9: ./test_runner_epoll: No such file or directory.
It seems like a bug in automake 1.12.6.
The errors will disappear if I simply upgrade automake to 1.13, and upgrade autoconf to 2.65
(2.65 is the lowest version dependent by automake-1.13).
When I build with automake-1.13 and autoconf-2.66, I got another error:
configure.ac:667: error: AC_CHECK_SIZEOF: requires literal arguments
The code in configure.ac line 667 is :
AC_CHECK_SIZEOF(void *)
It is a bug in autoconf-2.66 :
http://gnu-autoconf.7623.n7.nabble.com/AC-CHECK-SIZEOF-int-is-error-in-autoconf-2-66-td13537.html
Finally, everything works fine when using automake-1.13 and autoconf-2.67.
Refs: #858
On my computer, the version of autoconf is 2.59 and automake is 1.9
I build with autogen.sh & configure & make and failed.
I find In Makefile.am:
include/event2/event-config.h: config.h make-event-config.sed
$(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2
$(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T
$(AM_V_at)mv -f $@T $@
There are three undefined variables: MKDIR_P, AM_V_GEN and AM_V_at.
Then I tried:
- autoconf-2.60 / automake-1.10
- autoconf-2.61 / automake-1.11
- autoconf-2.62 / automake-1.11.2
And only autoconf-2.62 & automake-1.11.2 is ok.
Therefore, I recommend changing the autoconf version from 2.59 to 2.62
and automake version from 1.9 to 1.11.2.
Plus autoconf 2.59 is too old - 2003.12.16 [1], so as automake 1.9 -
2004.08.11 [2], while $(AM_V_GEN)/$(AM_V_at) had been introduced in
371a1237 back in 2012.
[1]: http://ftp.gnu.org/gnu/autoconf/
[1]: http://ftp.gnu.org/gnu/automake/
Fixes: 371a1237 ("Make quiet build even quieter")
Adds two new callbacks: "prepare" watchers, which fire immediately
before we poll for I/O, and "check" watchers, which fire immediately
after we finish polling and before we process events. This allows other
event loops to be embedded into libevent's, and enables certain
performance monitoring.
Closes: #710
Not changing anything right now AFAIK. But if for any reason in the
future we end up with two headers with the same name in the source and
build directories, chances are we want to use the one in the build
directory.
It will be generated by autotools, so there is not reason to include it.
And infact this breaks compilation with out-of-tree builds (VPATH),
since, for the quote form of the include directive, headers in the
directory of the file with the #include line have priority over those
named in -I options, the copy of evconfig-private.h from the source
directory had priority over the one in the build directory.
This will allow a parent package to specify compiler, CPP, and linker
flags to a libevent built as a sub-package. Document this in
whatsnew-2.2.txt.
Picked-from: #506Closes: #506
And according to f8d80a285cf941505277d9060d0357b5b7e543d2 ("Bump version
to 2.1.3-alpha-dev") numeric version have 1 at the end, since it means
"-dev".
P.S. in referenced commit I made a mistake and instead of *-rc* I wrote
*-beta*.
See-also: f4489b8323cda0bf8eed7c1353911a852d7a947c ("Bump version to
2.1.7-beta everywhere")
Revert: 61179dec7716975a151c6dae4524ae504d05780e ("automake: define
serial-tests only if automake have this option") Revert:
Revert: 44d755e00e249c09914cf35089c16735df82e270 ("test/automake: don't
use paralell test harness (since automake 1.12)")
Starting from automake 1.2 there is parallel test harness, that redirects all
output to some log, which serial-test doesn't do.
So in case of new runner we can get no output for 10 minutes, for example on my
desktop:
$ time make verify VERBOSE=1
PASS: test/test-script.sh
============================================================================
Testsuite summary for libevent 2.1.5-beta
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
real 25m31.735s
user 0m13.753s
sys 0m7.648s
And this means that this will fail on travis-ci, since it has timeout for 10
minutes. Sure we can use `travis wait 60` instead, but I think that it is
better to fix this by writing result to output, instead of hacking around, so
let's use serial-tests instead of parallel always.
And now it works on travis-ci under linux because it has automake 1.11 while
osx has at least 1.12.
Links:
https://docs.travis-ci.com/user/common-build-problems/https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html#Serial-Test-Harnesshttps://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html
CI:
https://travis-ci.org/azat/libevent/jobs/129171497 # ok on linux
https://travis-ci.org/azat/libevent/jobs/129171532 # no output for 10 min on osx
This approach should let Make work better, let libevent build faster
(especially when using a parallelized build), and basically make the
Makefiles easier to maintain.
See http://miller.emu.id.au/pmiller/books/rmch/ for more info on why
you'd want to do this.
This is due to an idea from Zack Weinberg; the patch is my own.