mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-26 21:20:38 +00:00
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
This commit is contained in:
parent
667dfef7a7
commit
66b64819d5
1
TODO
1
TODO
@ -17,4 +17,3 @@
|
||||
|
||||
* Check other filters for the EV_DISPATCH bug that was fixed in r252.
|
||||
|
||||
* Merge the fix from r546 in the stable branch.
|
||||
|
23
test/user.c
23
test/user.c
@ -113,6 +113,28 @@ test_kevent_user_oneshot(struct test_context *ctx)
|
||||
test_no_kevents(ctx->kqfd);
|
||||
}
|
||||
|
||||
static void
|
||||
test_kevent_user_multi_trigger_merged(struct test_context *ctx)
|
||||
{
|
||||
struct kevent kev, ret;
|
||||
int i;
|
||||
|
||||
test_no_kevents(ctx->kqfd);
|
||||
|
||||
kevent_add(ctx->kqfd, &kev, 2, EVFILT_USER, EV_ADD | EV_CLEAR, 0, 0, NULL);
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
kevent_add(ctx->kqfd, &kev, 2, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
|
||||
|
||||
kev.flags = EV_CLEAR;
|
||||
kev.fflags &= ~NOTE_FFCTRLMASK;
|
||||
kev.fflags &= ~NOTE_TRIGGER;
|
||||
kevent_get(&ret, ctx->kqfd);
|
||||
kevent_cmp(&kev, &ret);
|
||||
|
||||
test_no_kevents(ctx->kqfd);
|
||||
}
|
||||
|
||||
#ifdef EV_DISPATCH
|
||||
void
|
||||
test_kevent_user_dispatch(struct test_context *ctx)
|
||||
@ -163,6 +185,7 @@ test_evfilt_user(struct test_context *ctx)
|
||||
test(kevent_user_get_hires, ctx);
|
||||
test(kevent_user_disable_and_enable, ctx);
|
||||
test(kevent_user_oneshot, ctx);
|
||||
test(kevent_user_multi_trigger_merged, ctx);
|
||||
#ifdef EV_DISPATCH
|
||||
test(kevent_user_dispatch, ctx);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user