diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-01-24 04:30:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:18 -0500 |
commit | 8ffc4c430cf4942a1eaedec6fc60e9d538817a07 (patch) | |
tree | f07f8e67c6f1e2f98fe5c1418c84c950797290fa /source4/torture | |
parent | 7d184f1f7278e8b034c0aca7fd40714884951624 (diff) | |
download | samba-8ffc4c430cf4942a1eaedec6fc60e9d538817a07.tar.gz samba-8ffc4c430cf4942a1eaedec6fc60e9d538817a07.tar.bz2 samba-8ffc4c430cf4942a1eaedec6fc60e9d538817a07.zip |
r20990: check for errors from event_loop_once()
(This used to be commit 6af4557b1306e7e6a23c697cef3467d0f0458531)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/local/event.c | 10 |
1 files changed, 8 insertions, 2 deletions
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)); |