X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-06-idle.c;h=7ae16e9e96a3f8203c05d5d2778729c3573af290;hp=51cca961a077416c47287a5b78d697cd5513d554;hb=cdf62dce7077a9f9a818edbb67d31d033cbb73c6;hpb=13b38a7282c6043d6abe310e5a16d6610ed7a1c1 diff --git a/ccan/io/test/run-06-idle.c b/ccan/io/test/run-06-idle.c index 51cca961..7ae16e9e 100644 --- a/ccan/io/test/run-06-idle.c +++ b/ccan/io/test/run-06-idle.c @@ -29,6 +29,7 @@ static struct io_plan read_done(struct io_conn *conn, struct data *d) static void finish_waker(struct io_conn *conn, struct data *d) { + ok1(io_is_idle(idler)); io_wake(idler, io_read(d->buf, sizeof(d->buf), read_done, d)); ok1(d->state == 1); d->state++; @@ -38,7 +39,7 @@ static void finish_idle(struct io_conn *conn, struct data *d) { ok1(d->state == 3); d->state++; - io_break(d, io_idle()); + io_break(d, io_never()); } static struct io_plan never(struct io_conn *conn, void *arg) @@ -102,7 +103,7 @@ int main(void) int fd, status; /* This is how many tests you plan to run */ - plan_tests(13); + plan_tests(14); d->state = 0; fd = make_listen_fd(PORT, &addrinfo); ok1(fd >= 0);