git.samba.org
/
metze
/
old
/
samba4-sync
/
samba4-draft
/
git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b76d3
)
r20990: check for errors from event_loop_once()
author
Andrew Tridgell
<tridge@samba.org>
Wed, 24 Jan 2007 04:30:44 +0000
(
04:30
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 24 Jan 2007 04:30:44 +0000
(
04:30
+0000)
source/torture/local/event.c
patch
|
blob
|
history
diff --git
a/source/torture/local/event.c
b/source/torture/local/event.c
index 9d15f517eb8a6b0a6e13e3068e932eb5b888bfe0..383e959183c87e1800128eb24dd2bcc4f00e1dbf 100644
(file)
--- a/
source/torture/local/event.c
+++ b/
source/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));