test/test.sh

Branch


Log

Author Commit Date CI Message
Andy Pan aef201a9 2024-04-29T13:35:33 Change ident for EVFILT_USER to 0 and add a test (#1582) Conventionally, ident for EVFILT_USER is set to 0 to avoid collision of file descriptors, which is what other renowned networking frameworks like netty(java), mio(rust), gnet(go), swift-nio(swift), etc. do currently. Co-authored-by: Azat Khuzhin <azat@libevent.org>
Azat Khuzhin 57d9eec6 2023-07-10T10:40:49 Disable signalfd by default signalfd may behave differently to sigaction/signal, so to avoid breaking libevent users (like [1], [2]) disable it by default. [1]: https://github.com/tmux/tmux/pull/3621 [2]: https://github.com/tmux/tmux/pull/3626 Also signalfd is not that perfect: - you need to SIG_BLOCK the signal before - blocked signals are not reset on exec - blocked signals are allowed to coalesce - so in case of multiple signals sent you may get the signal only once (ok for most of the signals, but may be a problem for SIGCHLD, though you may call waitpid() in a loop or use pidfd) - and also one implementation problem - sigprocmask is unspecified in a multithreaded process Refs: - https://lwn.net/Articles/415684/ - https://ldpreload.com/blog/signalfd-is-useless Refs: https://github.com/libevent/libevent/issues/1460 Refs: #1342 (cc @dmantipov)
Nick Grifka 83ef3216 2020-04-22T19:44:45 Add wepoll support to light up the epoll backend on Windows 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
Kiyoshi Aman 8b0aa7b3 2017-09-14T17:39:20 Port `event_rpcgen.py` and `test/check-dumpevents.py` to Python 3. These scripts remain compatible with Python 2.
Azat Khuzhin 54d7473f 2017-01-20T16:29:02 test: run different tests under different options (in a wrapper)
Azat Khuzhin cf2cf2a0 2015-09-02T11:51:00 test: run regress with EVENT_DEBUG_MODE=1 and without This could show some bugs like "event_assign called on an already added event", and some others that debugging mode could track.
Diego Giagio b1b69ac7 2014-01-17T23:20:42 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
Nick Mathewson 9e3a99ca 2013-04-30T20:09:52 Fix a bug in fixing a bug in out-of-tree test-dumpevents
Nick Mathewson cbfc35f6 2013-04-30T14:26:47 Fix some out-of-tree build bugs
Nick Mathewson c1420690 2012-11-19T09:07:13 Fix a bug when running "make verify" out-of-tree
Ross Lagerwall 4b5f32a5 2012-10-23T13:26:44 Use python2 rather than python python may refer to either python2 or python3 so rather by explicit by using python2. See PEP 394 - http://www.python.org/dev/peps/pep-0394/ for more details.
Nick Mathewson f1bd9388 2012-08-02T15:02:27 Avoid test -e; older shs don't have one. Reported by Paul Croome. Report forwarded by Dave Hart.
Nick Mathewson f2cea873 2012-06-28T13:18:28 Make all tests that hit the network disabled by default To run only these tests, run test/regress with @live_net. To run all tests, run test/regress with @all.
Nick Mathewson 26c75828 2012-04-26T16:22:03 When PRECISE_TIMERS is set with epoll, use timerfd for microsecond precision The epoll interface ordinarily gives us one-millisecond precision, so on Linux it makes perfect sense to use the CLOCK_MONOTONIC_COARSE timer. But when the user has set the new PRECISE_TIMER flag for an event_base (either by the EVENT_BASE_FLAG_PRECISE_TIMER flag, or by the EVENT_PRECISE_TIMER environment variable), they presumably want finer granularity. On not-too-old Linuxes, we can achieve this using the Timerfd mechanism, which accepts nanosecond granularity and understands posix clocks. It's a little more expensive than just calling epoll_wait(), so we won't do it by default.
Ross Lagerwall 9b856fd5 2012-04-07T17:32:00 Simplify test.sh code significantly. Also make it easier to add new tests/backends.
Nick Mathewson 55e8dc1b 2012-04-03T14:51:51 Make check-dumpevents work with out-of-tree builds
Ross Lagerwall 029a3db3 2012-03-26T20:12:45 Require at least Python 2.4 for check-dumpevents.py.
Nick Mathewson 7afe48aa 2012-03-23T17:56:23 Add a unit test for event_base_dump_events() This function uses a C program to generate its output, and then uses a Python program to check it for correctness. On systems without Python, we just make sure that the C program doesn't crash. It's likely that we should be requiring some particular python version. This is an alpha, though: I'm sure somebody will tell us which.
Ross Lagerwall 2ef92786 2012-02-23T21:40:02 Add a new test: test-fdleak which tests for fd leaks by creating many sockets. This test opens a server socket, and forks a child which connects to that server socket many times. It sets a low number for the max open file limit to catch any file descriptor leaks. It would not work on Windows since it uses fork() to be able to create both the server and the clients.
Nick Mathewson 16bacbc5 2011-07-05T14:43:24 Fix a test-call accidentally in the last commit
Nick Mathewson cd74c4ec 2011-07-05T14:41:46 More abstraction in test.sh
Nick Mathewson 039b9bd0 2011-02-22T00:31:56 Use %s with printf in test.sh
Dave Hart 49e9bb7f 2011-02-13T02:05:04 Add configure options to disable installation, regression tests The main reason for disabling installation is if you're building libevent as a subpackage for embedding: you want to have your main package's "make all" build libevent, but you don't want your main package's "make install" to install libevent.
Dave Hart b4f89b60 2011-02-01T01:15:48 Fix test.sh output on solaris Solaris echo -n doesn't omit newlines, but printf omits newlines in more places.
Nick Mathewson ece974fb 2010-11-22T14:13:24 Reorder backends in test.sh to match preference order in event.c
Nick Mathewson aed7e029 2010-11-22T14:10:01 Make unit tests for epoll-with-changelist pass The only changes needed were to handle the fact that the methodname "epoll (with changelist)" matches the environment variable EVENT_NOEPOLL rather than the imaginary "EVENT_EPOLL (WITH CHANGELIST)".
Nick Mathewson 7c926916 2010-07-19T15:14:10 Make test/test.sh call test-changelist Eventually test-changelist should expand to try more cases, maybe query the status of the actual changelist somehow, and integrate it with the rest of the unit tests. Also, add test-changelist to gitignore.
Nick Mathewson 3689bd2d 2010-05-26T13:32:32 Have the unit tests report errors from test.sh The default behavior of test.sh was to suppress all output from test/regress, and say nothing but OKAY or FAILED. This wasn't so good for getting bugs reported, since lots of people didn't know to set TEST_OUTPUT_FILE, or re-run ./test/regress on its own. Now, when you don't specify an output file for test.sh, it runs regress with the --quiet option. This option makes the unit tests only print output on failure, which is what we probably wanted.
Nick Mathewson faf2a04f 2010-05-26T13:31:41 Make test.sh exit with nonzero status if tests fail This behavior makes "make verify" actually fail when the tests fail, which is what it's supposed to do.
Nick Mathewson 3d9e05b1 2010-05-08T19:56:25 Fix test.sh on freebsd It turns out that in all conformant shells, "unset FOO" removes FOO both from the shell's variables and from the exported environment. (I've tested this on msys, opensolaris, linux, osx, and freebsd.) And in nearly every shell I can find, "unset FOO; export FOO" does the same as unset FOO... except in my FreeBSD VM, where the "export FOO" sets the exported value of FOO equal to "". This broke test.sh for us. The fix is simple: remove the needless exports!
Nick Mathewson 0ee6f6ce 2010-05-08T18:00:26 Make test.sh support mingw/msys on win32 This required: - Adding another WIN32 section in test.sh - not running "touch /dev/null" - calling WSAStartup in all the test binaries - Fixing a dumb windows-only bug in test-time.c
Nick Mathewson 94131e92 2010-01-12T15:58:36 Fix test.sh on shells without echo -n Some systems have a version of /bin/sh whose builtin echo doesn't support the -n option used in test/test.sh. /bin/echo, however, usually does. This patch makes us use /bin/echo for echo -n whenever it is present. Also, our use of echo -n really only made sense when suppressing all test output. Since test output isn't suppressed when logging to a file, this pach makes us stop using echo -n when logging to a file.
Nick Mathewson 0b151a9f 2009-12-29T18:11:52 Whitespace fixes in test.sh
Nick Mathewson 7dfbe94a 2009-12-29T18:07:51 Allow test.sh to be run as ./test/test.sh
Nick Mathewson c382de64 2009-12-29T17:59:55 Allow the user to redirect the verbose output of test/test.sh to a file By default, the test.sh script still suppresses the output of all the tests it invokes. Now, however, you can have that output written to a file specified in the TEST_OUTPUT_FILE shell variable.
Nick Mathewson e9564ece 2007-11-07T03:40:26 r16487@catbus: nickm | 2007-11-06 22:38:44 -0500 Remove rtsig method, as discussed in July. It hasn't compiled for quite a while, and nobody has seemed to miss it much. Please let us know if this was a bad call. [Tracker issue 1826539]. svn:r485
Nick Mathewson 3550be93 2007-09-25T15:50:50 r15331@catbus: nickm | 2007-09-25 11:46:52 -0400 Add EVPORT to test.sh script. Patch from Trond Norbye. svn:r454
Niels Provos acafd994 2005-09-02T05:34:01 make it run on older shells; from tor user via Nick Mathewson <nickm@freehaven.net> svn:r181
Niels Provos 06aaa92f 2004-07-30T04:57:21 devpoll support svn:r113
Niels Provos 1d66008b 2003-10-05T22:02:49 make it work with more shells svn:r86
Niels Provos ec70653b 2003-09-25T17:55:17 more tests svn:r81