1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

r20990: check for errors from event_loop_once()

(This used to be commit 6af4557b1306e7e6a23c697cef3467d0f0458531)
This commit is contained in:
Andrew Tridgell 2007-01-24 04:30:44 +00:00 committed by Gerald (Jerry) Carter
parent 7d184f1f72
commit 8ffc4c430c

View File

@ -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));