From: Niels Provos Date: Tue, 13 Jul 2004 08:01:05 +0000 (+0000) Subject: make the sockets non-blocking; increase the data size for bufferevent X-Git-Tag: release-1.1b~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee739151a155d358edc48c4ddf88a63b9e0132f0;p=libevent make the sockets non-blocking; increase the data size for bufferevent testing svn:r109 --- diff --git a/test/regress.c b/test/regress.c index 2ac4b113..19eda980 100644 --- a/test/regress.c +++ b/test/regress.c @@ -233,6 +233,14 @@ setup_test(char *name) exit(1); } +#ifdef HAVE_FCNTL + if (fcntl(pair[0], F_SETFL, O_NONBLOCK) == -1) + warn("fcntl(O_NONBLOCK)"); + + if (fcntl(pair[1], F_SETFL, O_NONBLOCK) == -1) + warn("fcntl(O_NONBLOCK)"); +#endif + test_ok = 0; called = 0; return (0); @@ -452,7 +460,7 @@ test8(void) void readcb(struct bufferevent *bev, void *arg) { - if (EVBUFFER_LENGTH(bev->input) == 4096) { + if (EVBUFFER_LENGTH(bev->input) == 8333) { bufferevent_disable(bev, EV_READ); test_ok++; } @@ -475,7 +483,7 @@ void test9(void) { struct bufferevent *bev1, *bev2; - char buffer[4096]; + char buffer[8333]; int i; setup_test("Bufferevent: ");