torture3: Fix local-messaging-read1
authorVolker Lendecke <vl@samba.org>
Wed, 7 May 2014 06:49:04 +0000 (08:49 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 8 May 2014 07:10:12 +0000 (09:10 +0200)
Now that we defer requests in dispatch_rec, we need 3 rounds to finish
the requests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/test_messaging_read.c

index 387ebfde8784cec5d83a8fb2d4806303108623fb..188b0216e7185e67ec0d7e4bece8ac07b5b63d16 100644 (file)
@@ -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);