Commit Graph

143 Commits

Author SHA1 Message Date
eradman
655165d380 Minor imporovements to test runner:
* kqtest help message includes the names of test suites that can be run
  * no need to test for EV_RECEIPT since it's always defined in our local copy of event.h
  * include netdb.h to enable builds on *BSD.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@652 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-06-11 14:45:42 +00:00
eradman
c46321fbda cast off_t as (unsigned long) so that tests build on MacOS 10.8. MacOS and FreeBSD should both serve as a useful reference for the correctness of the tests.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@651 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-06-04 16:28:46 +00:00
eradman
96faa0057a Remove extra print statement from test_kevent_user_oneshot()
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@650 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-06-04 14:22:34 +00:00
eradman
66b64819d5 Adapt test_kevent_user_multi_trigger_merged() from the 1.0 branch. It appears that 2.0-current does not suffer from the same problem. Tests pass on Debian 6.0/i386.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@649 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-06-04 14:14:36 +00:00
mheily
a40f69b820 disable signal test on android
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@633 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-02-01 01:58:52 +00:00
mheily
57f14047f6 Remove concurrency, re-enable signal tests
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@632 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-01-25 02:59:35 +00:00
mheily
757116ae6a Fixes for _WIN32. Eliminates the use of MAKE_STATIC and the DllMain constructor.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@630 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-01-25 02:43:43 +00:00
mheily
c7ed4e84f3 Minor tweaks for cross-compiling to Win32
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@629 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-01-24 02:40:19 +00:00
mheily
24baeafda7 Use ifdef instead of check_decl() where possible.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@612 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2013-01-06 17:28:12 +00:00
mheily
3530b37e2a * Use ppoll(2) where possible (Credit: Eric Wong)
* Reenable some additional unit tests



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@610 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-12-24 23:37:59 +00:00
mheily
ddd7f1b4b3 More win32 test changes
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@602 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-27 04:49:44 +00:00
mheily
214ef72435 Fix path to config.h
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@597 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-27 00:00:26 +00:00
mheily
d46b5e43bf Final fixes for Android.
The testsuite runs on Linux and Android now.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@595 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 03:59:02 +00:00
mheily
59c2a31d48 Minor fixes for Android
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@593 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 02:56:10 +00:00
mheily
e41cc259a0 * Ensure that calling close() on a file descriptor will remove any
kevents that reference the descriptor. [merged from ^/branches/stable@551]



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@590 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-25 22:31:57 +00:00
mheily
f6a37c0a51 Add support for concurrent tests.
Test providing an invalid kqueue descriptor to kevent()

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@532 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-02-10 01:25:35 +00:00
mheily
8cbdb46b43 Eliminate use of global variable "cur_test_id"
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@523 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-30 14:59:08 +00:00
mheily
a0d54bda95 Build a debug-enabled static library.
Build two versions of kqtest with and without debugging enabled.
Use static linking for kqtest and kqtest_debug.
Add additional Makefile targets for profiling with Valgrind
Enable gprof profiling in the debug targets.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@520 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-26 03:45:28 +00:00
mheily
cd858d02fd Eliminate the use of global state variables in kqtest to allow the tests
to be run in parallel.

Add two kqtest options: one for iterations, and one for concurrency.

Use -rpath when building kqtest instead of using LD_LIBRARY_PATH



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@519 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-25 02:10:36 +00:00
mheily
5d11e7e930 - Build the static library with MAKE_STATIC to expose libkqueue_init().
- Build a statically-linked version of kqtest during 'make check'.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@517 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 03:01:24 +00:00
mheily
0c2f0771b5 - Build two versions of the library: one for debugging, and one for release.
- Link kqtest against libkqueue_debug.so
- Build 


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@516 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 02:44:16 +00:00
mheily
af270012fc Another tracing_mutex_assert() fix
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@515 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 01:20:24 +00:00
mheily
140343f197 Fix tracing_mutex_assert() by tracking the thread ID of the lock owner and
behave properly when the mutex is held by another thread.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@514 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 00:57:44 +00:00
mheily
4c4a1b9b03 Fix the 'make debug' target under Windows.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@504 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 01:59:38 +00:00
mheily
c9f509e34f - Fix compilation issues on MinGW.
- Improve error handling in test/read.c

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@503 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 01:30:02 +00:00
marius
699bb19e76 Fixed some mistakes within the CMakeLists.txt
Made latest revision compatible to windows again

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@500 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-04 17:39:25 +00:00
mheily
e138f4a4c9 Add tracing mutexes to debug.h.
/*
 * Tracing mutexes are a thin wrapper around the pthread_mutex_t 
 * datatype that tracks and reports when a mutex is locked or unlocked.
 * It also allows you to assert that a mutex has (or has not) been locked
 * by calling tracing_mutex_assert().
 */



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@493 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-29 03:28:07 +00:00
marius
731410fef0 EVFILT_USER implementation on windows
Change VS Solution structure to be more well-arranged

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@490 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-26 20:12:28 +00:00
mheily
1b4e9d4af8 Partial implementation of EVFILT_READ on Windows.
Switch to using IOCP as the synchronization mechanism on Windows instead of emulating pthread condition variables.

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@487 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-25 02:50:54 +00:00
mheily
04ca8661f7 Change the EVFILT_READ test to use TCP sockets instead of UNIX domain sockets,
so the tests can be run on Windows.

Fix a bug on Linux where epoll() will not return EPOLLHUP when a TCP socket
is closed. Instead, it will return POLLIN with zero bytes in the protocol
buffer.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@486 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-24 02:56:17 +00:00
mheily
9bbb71b801 Fix various build issues on MinGW.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@485 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-23 18:27:10 +00:00
marius
86b1fbb760 EVTFILT_TIMER working on windows
Added binary files on windows to svn:ignore

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@483 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-17 19:34:34 +00:00
marius
dc2761332f Added CMakeLists.txt for libkqueue and tests
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@482 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-16 08:57:12 +00:00
mheily
650452c28f Fix format string type mismatch
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@475 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-14 00:25:27 +00:00
marius
9abd0fc49c Made libkqueue compile on windows again - functionality still broken on this platform
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@473 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-13 17:35:34 +00:00
mheily
10ec7ad485 Add a test for high-resolution kevent() calls on Linux
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@467 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-09 01:24:59 +00:00
mheily
4e607edd42 Support regular files with EVFILT_READ, fixes the dispatch_read test in libdispatch
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@466 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-06 02:49:48 +00:00
mheily
855362d95f Split socket.c into two separate files: read.c and write.c. This means that EVFILT_READ and EVFILT_WRITE are now completely separate filters.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@464 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-05 22:22:48 +00:00
mheily
2b21880288 Move knote_get_socket_type() into linux/socket.c.
Partial support for EVFILT_READ with regular files.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@463 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-05 21:17:21 +00:00
mheily
c8762ecddb Fix another 32-bit compilation issue
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@457 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-03-19 14:11:59 +00:00
mheily
f303c205aa Add an additional sanity check
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@429 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-02-20 03:24:57 +00:00
mheily
3c17c8a2b0 More Solaris improvements
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@428 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-02-16 03:11:19 +00:00
mheily
a2b8894d94 add file and line number to kevent_cmp()
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@425 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-02-15 23:53:04 +00:00
mheily
b3d0b26c5a add additional valgrind targets
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@409 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-02-02 02:54:50 +00:00
mheily
736b3ad6bc Make the Linux backend completely independent from the POSIX backend.
Optimize the Linux backend to remove the use of a per-filter pollfd. 
Each knote now adds a pollable descriptor to a per-kqueue epollfd.

Windows and Solaris backends are not yet refactored and are broken.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@408 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-02-01 02:40:59 +00:00
mheily
e814dc5c6d win32 timer filter mostly done, improved windows_kevent_wait()
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@404 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-01-21 03:30:35 +00:00
mheily
29a754d3f8 bugfix
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@403 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-01-19 03:19:23 +00:00
mheily
478a9c1bdb linux fixes
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@402 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-01-19 03:06:32 +00:00
mheily
0d41f5fd5c bugfix kqtest
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@395 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-01-17 03:44:17 +00:00
mheily
cdc4911ce2 port unit tests to win32
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@394 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-01-17 02:23:12 +00:00