summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/local/event.c10
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));