doc updates, change internal test API function

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@94 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2009-11-15 23:59:02 +00:00
parent b44551fd69
commit b78679cd98
8 changed files with 44 additions and 41 deletions

View File

@ -66,6 +66,6 @@ kevent_add(int kqfd, struct kevent *kev,
extern void test_no_kevents(void);
extern void test_begin(const char *);
extern void success();
extern void success(void);
#endif /* _COMMON_H */

View File

@ -32,7 +32,7 @@ add_and_delete(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id1);
success(test_id1);
success();
test_begin(test_id2);
@ -40,7 +40,7 @@ add_and_delete(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id2);
success(test_id2);
success();
}
@ -70,7 +70,7 @@ test_kevent_signal_get(void)
kev.data = 1;
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
void
@ -96,7 +96,7 @@ test_kevent_signal_disable(void)
test_no_kevents();
success(test_id);
success();
}
void
@ -133,7 +133,7 @@ test_kevent_signal_enable(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -159,7 +159,7 @@ test_kevent_signal_del(void)
err(1, "kill");
test_no_kevents();
success(test_id);
success();
}
void
@ -192,7 +192,7 @@ test_kevent_signal_oneshot(void)
err(1, "kill");
test_no_kevents();
success(test_id);
success();
}
#endif

View File

@ -50,7 +50,7 @@ test_kevent_socket_add(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -77,7 +77,7 @@ test_kevent_socket_get(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -111,7 +111,7 @@ test_kevent_socket_clear(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -147,7 +147,7 @@ test_kevent_socket_disable_and_enable(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -166,7 +166,7 @@ test_kevent_socket_del(void)
test_no_kevents();
kevent_socket_drain();
success(test_id);
success();
}
void
@ -199,7 +199,7 @@ test_kevent_socket_oneshot(void)
kevent_socket_drain();
success(test_id);
success();
}
@ -234,7 +234,7 @@ test_kevent_socket_dispatch(void)
kevent_socket_drain();
success(test_id);
success();
}
#endif /* HAVE_EV_DISPATCH */
@ -268,7 +268,7 @@ test_kevent_socket_lowat(void)
kevent_socket_drain();
kevent_socket_drain();
success(test_id);
success();
}
#endif
@ -297,7 +297,7 @@ test_kevent_socket_eof(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void

View File

@ -30,7 +30,7 @@ test_kevent_signal_add(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -58,7 +58,7 @@ test_kevent_signal_get(void)
kev.data = 1;
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
void
@ -84,7 +84,7 @@ test_kevent_signal_disable(void)
test_no_kevents();
success(test_id);
success();
}
void
@ -121,7 +121,7 @@ test_kevent_signal_enable(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -147,7 +147,7 @@ test_kevent_signal_del(void)
err(1, "kill");
test_no_kevents();
success(test_id);
success();
}
void
@ -180,7 +180,7 @@ test_kevent_signal_oneshot(void)
err(1, "kill");
test_no_kevents();
success(test_id);
success();
}
void

View File

@ -30,7 +30,7 @@ test_kevent_timer_add(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -47,7 +47,7 @@ test_kevent_timer_del(void)
test_no_kevents();
success(test_id);
success();
}
void
@ -70,7 +70,7 @@ test_kevent_timer_get(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
static void
@ -97,7 +97,7 @@ test_oneshot(void)
test_no_kevents();
success(test_id);
success();
}
static void
@ -128,7 +128,7 @@ test_periodic(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
static void
@ -159,7 +159,7 @@ disable_and_enable(void)
kev.data = 1;
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
void

View File

@ -36,7 +36,7 @@ add_and_delete(void)
err(1, "%s", test_id);
test_no_kevents();
success(test_id);
success();
}
static void
@ -57,7 +57,7 @@ event_wait(void)
test_no_kevents();
success(test_id);
success();
}
static void
@ -83,7 +83,7 @@ disable_and_enable(void)
kev.fflags &= ~NOTE_TRIGGER;
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
static void
@ -116,7 +116,7 @@ oneshot(void)
test_no_kevents();
success(test_id);
success();
}
void

View File

@ -40,7 +40,7 @@ test_kevent_vnode_add(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -60,7 +60,7 @@ test_kevent_vnode_note_delete(void)
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
void
@ -84,7 +84,7 @@ test_kevent_vnode_note_write(void)
kev.fflags |= NOTE_EXTEND; // XXX-FIXME compatibility issue
kevent_cmp(&kev, kevent_get(kqfd));
success(test_id);
success();
}
void
@ -112,7 +112,7 @@ test_kevent_vnode_note_attrib(void)
err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
success(test_id);
success();
}
void
@ -143,7 +143,7 @@ test_kevent_vnode_note_rename(void)
if (system("mv /tmp/kqueue-test2.tmp /tmp/kqueue-test.tmp") < 0)
err(1, "system");
success(test_id);
success();
}
void
@ -158,7 +158,7 @@ test_kevent_vnode_del(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "%s", test_id);
success(test_id);
success();
}
void
@ -200,7 +200,7 @@ test_kevent_vnode_disable_and_enable(void)
err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
success(test_id);
success();
}
#if HAVE_EV_DISPATCH
@ -242,7 +242,7 @@ test_kevent_vnode_dispatch(void)
if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
err(1, "remove watch failed: %s", test_id);
success(test_id);
success();
}
#endif /* HAVE_EV_DISPATCH */

View File

@ -131,6 +131,9 @@ There are some differences in the behavior of the <code>kevent(2)</code> system
OpenBSD has the <i>NOTE_TRUNCATE</i> fflag, while FreeBSD and Darwin do not.
</li>
<li>
EVFILT_FS is undocumented and only available on FreeBSD and Darwin. Here is the <a href="http://adam.kungfoohampster.com/lists/cvs-all/msg71399.shtml">CVS commit log</a> which could be helpful to document this filter.
</li>
<!--
<li>
[TODO - Verify and check against 10.6] OS X 10.5 and earlier do not implement the <code>EVFILT_AIO</code> or <code>EVFILT_TIMER</code> filters.