libkqueue 0.3 released
libkqueue version 0.3 is now available. The detailed changes are below. Would someone with an OS X 10.6 system please try running the unit test suite? I have implemented EVFILT_USER under Linux, but am not sure that the behavior matches OS X. Also, I remember seeing some libdispatch-related kqueue commits to FreeBSD, so if someone has access to a FreeBSD CURRENT system with the necessary bits, please try the running the libkqueue test suite there as well. Thanks, - Mark 2009-11-10 v0.3 r84 ------------------------------------------------------------------------ * The EVFILT_USER filter has been implemented, but needs additional testing. * The EVFILT_PROC filter is partially implemented on Linux, but is currently broken. * The unit tests have been moved to a separate subdirectory and now function under OpenBSD 4.4 using the native kqueue(2) and kevent(2) system calls. * The kqueue_free() function has been removed. * A helper thread performs garbage collection when close(2) is called on the file descriptor returned by kqueue(). * All symbols in <sys/event.h> that are not implemented are now undefined. * Major internal reorganization of the source tree. * A copy-and-paste error in vnode.c has been fixed. * The pthreads library is now required.
I just did a make check in a fresh checkout (rev 86) and got this: uname -a Darwin MacBook.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 make check cd test && ./configure && make check checking operating system type.. darwin checking for a BSD-compatible install.. /usr/bin/install checking for sys/event.h.. yes checking sys/event.h for EV_DISPATCH.. yes checking sys/event.h for EV_RECEIPT.. yes checking sys/event.h for NOTE_TRUNCATE.. no checking sys/event.h for EVFILT_TIMER.. yes checking sys/event.h for EVFILT_USER.. yes Creating config.h Creating config.mk if [ ! -f /usr/include/sys/event.h ] ; then \ cd .. && ./configure --debug=yes && make build ; \ fi cc -g -O0 -Wall -Werror main.c proc.c read.c signal.c timer.c vnode.c user.c ./a.out Test 1: kqueue() confirming that there are no events pending kqueue() passed Test 2: close(kq) kqueue_close() passed Test 3: kevent(EVFILT_READ, EV_ADD) kevent(EVFILT_READ, EV_ADD) passed Test 4: kevent(EVFILT_READ, EV_DELETE) filling the read buffer confirming that there are no events pending draining the read buffer kevent(EVFILT_READ, EV_DELETE) passed Test 5: kevent(EVFILT_READ) wait filling the read buffer draining the read buffer confirming that there are no events pending kevent(EVFILT_READ) wait passed Test 6: kevent(EVFILT_READ, EV_DISABLE) filling the read buffer confirming that there are no events pending draining the read buffer kevent(EVFILT_READ, EV_DISABLE) passed Test 7: kevent(EVFILT_READ, EV_ONESHOT) -- re-adding knote confirming that there are no events pending -- getting one event filling the read buffer -- checking knote disabled confirming that there are no events pending draining the read buffer kevent(EVFILT_READ, EV_ONESHOT) passed Test 8: kevent(EVFILT_READ, EV_CLEAR) confirming that there are no events pending filling the read buffer filling the read buffer draining the read buffer confirming that there are no events pending draining the read buffer kevent(EVFILT_READ, EV_CLEAR) passed Test 9: kevent(EVFILT_READ, EV_DISPATCH) -- re-adding knote confirming that there are no events pending filling the read buffer kevent_cmp: mismatch: [filter=-1,flags = 1 (EV_ADD),fflags = 1,ident=3,data=1,udata=0x10000617c] != [filter=-1,flags = 129 (EV_ADD EV_DISPATCH),fflags = 129,ident=3,data=1,udata=0x10000617c] make[1]: *** [check] Abort trap make: *** [check] Error 2 Le 11 nov. 2009 à 04:10, Mark Heily a écrit :
libkqueue version 0.3 is now available. The detailed changes are below.
Would someone with an OS X 10.6 system please try running the unit test suite? I have implemented EVFILT_USER under Linux, but am not sure that the behavior matches OS X.
Also, I remember seeing some libdispatch-related kqueue commits to FreeBSD, so if someone has access to a FreeBSD CURRENT system with the necessary bits, please try the running the libkqueue test suite there as well.
Thanks,
- Mark
2009-11-10 v0.3 r84 ------------------------------------------------------------------------
* The EVFILT_USER filter has been implemented, but needs additional testing.
* The EVFILT_PROC filter is partially implemented on Linux, but is currently broken.
* The unit tests have been moved to a separate subdirectory and now function under OpenBSD 4.4 using the native kqueue(2) and kevent(2) system calls.
* The kqueue_free() function has been removed.
* A helper thread performs garbage collection when close(2) is called on the file descriptor returned by kqueue().
* All symbols in <sys/event.h> that are not implemented are now undefined.
* Major internal reorganization of the source tree.
* A copy-and-paste error in vnode.c has been fixed.
* The pthreads library is now required. _______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
-- Jean-Daniel
Jean-Daniel Dupas wrote:
I just did a make check in a fresh checkout (rev 86) and got this:
Test 9: kevent(EVFILT_READ, EV_DISPATCH) -- re-adding knote confirming that there are no events pending filling the read buffer kevent_cmp: mismatch: [filter=-1,flags = 1 (EV_ADD),fflags = 1,ident=3,data=1,udata=0x10000617c] != [filter=-1,flags = 129 (EV_ADD EV_DISPATCH),fflags = 129,ident=3,data=1,udata=0x10000617c] make[1]: *** [check] Abort trap make: *** [check] Error 2
Thanks for running the tests. I just committed r87 which should fix this problem. Regards, - Mark
Le 12 nov. 2009 à 03:59, Mark Heily a écrit :
Jean-Daniel Dupas wrote:
I just did a make check in a fresh checkout (rev 86) and got this: Test 9: kevent(EVFILT_READ, EV_DISPATCH) -- re-adding knote confirming that there are no events pending filling the read buffer kevent_cmp: mismatch: [filter=-1,flags = 1 (EV_ADD),fflags = 1,ident=3,data=1,udata=0x10000617c] != [filter=-1,flags = 129 (EV_ADD EV_DISPATCH),fflags = 129,ident=3,data=1,udata=0x10000617c] make[1]: *** [check] Abort trap make: *** [check] Error 2
Thanks for running the tests. I just committed r87 which should fix this problem.
Regards,
Yep, I reach test 21 now: Test 21: kevent(EVFILT_VNODE, NOTE_WRITE) kevent_cmp: mismatch: [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 6 (NOTE_WRITE NOTE_EXTEND), data=0, udata=0x0] != [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 2 (NOTE_WRITE), data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 -- Jean-Daniel
Le 12 nov. 2009 à 10:06, Jean-Daniel Dupas a écrit :
Le 12 nov. 2009 à 03:59, Mark Heily a écrit :
Jean-Daniel Dupas wrote:
I just did a make check in a fresh checkout (rev 86) and got this: Test 9: kevent(EVFILT_READ, EV_DISPATCH) -- re-adding knote confirming that there are no events pending filling the read buffer kevent_cmp: mismatch: [filter=-1,flags = 1 (EV_ADD),fflags = 1,ident=3,data=1,udata=0x10000617c] != [filter=-1,flags = 129 (EV_ADD EV_DISPATCH),fflags = 129,ident=3,data=1,udata=0x10000617c] make[1]: *** [check] Abort trap make: *** [check] Error 2
Thanks for running the tests. I just committed r87 which should fix this problem.
Regards,
Yep, I reach test 21 now:
Test 21: kevent(EVFILT_VNODE, NOTE_WRITE) kevent_cmp: mismatch: [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 6 (NOTE_WRITE NOTE_EXTEND), data=0, udata=0x0] != [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 2 (NOTE_WRITE), data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2
If it may help, here is all next failing tests: Test 21: kevent(EVFILT_VNODE, NOTE_WRITE) kevent_cmp: mismatch: [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 6 (NOTE_WRITE NOTE_EXTEND), data=0, udata=0x0] != [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 2 (NOTE_WRITE), data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 Test 24: kevent(EVFILT_VNODE, NOTE_DELETE) kevent_cmp: mismatch: [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 1 (NOTE_DELETE), data=0, udata=0x0] != [ident=5, filter=-4, flags = 17 (EV_ADD EV_ONESHOT), fflags = 17 (NOTE_DELETE NOTE_LINK), data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 You have a bug in main.c:83 Should be kev->fflags instead of kev->flags snprintf(buf, 1024, "fflags = %d", kev->flags); Once this minor issue is fixed, the test 26 give this (without the fix, the event dumps are the same): Test 26: kevent(EVFILT_USER, wait) kevent_cmp: mismatch: [ident=1, filter=-10, flags = 1 (EV_ADD), fflags = 16777216, data=0, udata=0x0] != [ident=1, filter=-10, flags = 1 (EV_ADD), fflags = 0, data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 ditto for test 27 Test 27: kevent(EVFILT_USER, EV_DISABLE and EV_ENABLE) confirming that there are no events pending kevent_cmp: mismatch: [ident=1, filter=-10, flags = 1 (EV_ADD), fflags = 16777216, data=0, udata=0x0] != [ident=1, filter=-10, flags = 1 (EV_ADD), fflags = 0, data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 Test 28 Test 28: kevent(EVFILT_USER, EV_ONESHOT) -- event 1 kevent_cmp: mismatch: [ident=1, filter=-10, flags = 17 (EV_ADD EV_ONESHOT), fflags = 16777216, data=0, udata=0x0] != [ident=1, filter=-10, flags = 1 (EV_ADD), fflags = 0, data=0, udata=0x0] make[1]: *** [check] Abort trap make: *** [check] Error 2 Test 28.2 Test 28: kevent(EVFILT_USER, EV_ONESHOT) -- event 1 -- event 2 (should fail) a.out: kevent(EVFILT_USER, EV_ONESHOT): No such file or directory make[1]: *** [check] Error 1 make: *** [check] Error 2 And remaining tests are OK. -- Jean-Daniel
On Tue, 10 Nov 2009, Mark Heily wrote:
libkqueue version 0.3 is now available. The detailed changes are below.
Would someone with an OS X 10.6 system please try running the unit test suite? I have implemented EVFILT_USER under Linux, but am not sure that the behavior matches OS X.
Also, I remember seeing some libdispatch-related kqueue commits to FreeBSD, so if someone has access to a FreeBSD CURRENT system with the necessary bits, please try the running the libkqueue test suite there as well.
FYI, those changes are now also in FreeBSD 8.x. As soon as the libdispatch port is updated so that it's a trivial install, I'll update the FreeBSD/GCD notes and send out an updated announcement about GCD support on 8.x. Robert N M Watson Computer Laboratory University of Cambridge
Thanks,
- Mark
2009-11-10 v0.3 r84 ------------------------------------------------------------------------
* The EVFILT_USER filter has been implemented, but needs additional testing.
* The EVFILT_PROC filter is partially implemented on Linux, but is currently broken.
* The unit tests have been moved to a separate subdirectory and now function under OpenBSD 4.4 using the native kqueue(2) and kevent(2) system calls.
* The kqueue_free() function has been removed.
* A helper thread performs garbage collection when close(2) is called on the file descriptor returned by kqueue().
* All symbols in <sys/event.h> that are not implemented are now undefined.
* Major internal reorganization of the source tree.
* A copy-and-paste error in vnode.c has been fixed.
* The pthreads library is now required. _______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
participants (3)
-
Jean-Daniel Dupas
-
Mark Heily
-
Robert Watson