From 8ffc4c430cf4942a1eaedec6fc60e9d538817a07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Jan 2007 04:30:44 +0000 Subject: r20990: check for errors from event_loop_once() (This used to be commit 6af4557b1306e7e6a23c697cef3467d0f0458531) --- source4/torture/local/event.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/local/event.c b/source4/torture/local/event.c index 9d15f517eb..383e959183 100644 --- a/source4/torture/local/event.c +++ b/source4/torture/local/event.c @@ -98,7 +98,11 @@ static bool test_event_context(struct torture_context *test, t = timeval_current(); while (!finished) { - event_loop_once(ev_ctx); + if (event_loop_once(ev_ctx) == -1) { + torture_fail(test, "Failed event loop\n"); + talloc_free(ev_ctx); + return False; + } } talloc_free(fde); @@ -106,7 +110,9 @@ static bool test_event_context(struct torture_context *test, close(fd[1]); while (alarm_count < fde_count+1) { - event_loop_once(ev_ctx); + if (event_loop_once(ev_ctx) == -1) { + break; + } } torture_comment(test, "Got %.2f pipe events/sec\n", fde_count/timeval_elapsed(&t)); -- cgit