From 80365e030d63f2d9708748149fb329467a284039 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 7 May 2014 08:49:04 +0200 Subject: [PATCH] torture3: Fix local-messaging-read1 Now that we defer requests in dispatch_rec, we need 3 rounds to finish the requests Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/torture/test_messaging_read.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source3/torture/test_messaging_read.c b/source3/torture/test_messaging_read.c index 387ebfde878..188b0216e71 100644 --- a/source3/torture/test_messaging_read.c +++ b/source3/torture/test_messaging_read.c @@ -91,6 +91,7 @@ bool run_messaging_read1(int dummy) unsigned count2 = 0; NTSTATUS status; bool retval = false; + int i; ev = samba_tevent_context_init(talloc_tos()); if (ev == NULL) { @@ -121,9 +122,11 @@ bool run_messaging_read1(int dummy) goto fail; } - if (tevent_loop_once(ev) != 0) { - fprintf(stderr, "tevent_loop_once failed\n"); - goto fail; + for (i=0; i<3; i++) { + if (tevent_loop_once(ev) != 0) { + fprintf(stderr, "tevent_loop_once failed\n"); + goto fail; + } } printf("%u/%u\n", count1, count2); -- 2.11.4.GIT