r5394: as the timing should be fixed in the server now, don't accept to early replies
authorStefan Metzmacher <metze@samba.org>
Mon, 14 Feb 2005 09:44:58 +0000 (09:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:51 +0000 (13:09 -0500)
anymore, also print out usecs in the debug messages

metze
(This used to be commit 9a657f358e7aa3f96c414de033808de82fdb831a)

source4/torture/rpc/echo.c

index 9a2e656bfec5aa3512d619c1281923a9266abb83..d01bda1f6871d0b6166f142b8b80f0564ac9ea57 100644 (file)
@@ -263,19 +263,18 @@ static BOOL test_sleep(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                                                r[i].out.result, r[i].in.seconds, (uint_t)diff[i].tv_sec);
                                        ret = False;
                                } else {
                                                r[i].out.result, r[i].in.seconds, (uint_t)diff[i].tv_sec);
                                        ret = False;
                                } else {
-                                       if (r[i].out.result > diff[i].tv_sec+1) {
-                                               printf("Failed - Sleeped for %u seconds (but reply takes only %u seconds)\n", 
-                                                       r[i].out.result, (uint_t)diff[i].tv_sec);
-                                               ret = False;
+                                       if (r[i].out.result > diff[i].tv_sec) {
+                                               printf("Failed - Sleeped for %u seconds (but reply takes only %u.%06u seconds)\n", 
+                                                       r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
                                        } else if (r[i].out.result+1 == diff[i].tv_sec) {
                                        } else if (r[i].out.result+1 == diff[i].tv_sec) {
-                                               printf("Sleeped for %u seconds (but reply takes %u seconds - busy server?)\n", 
-                                                       r[i].out.result, (uint_t)diff[i].tv_sec);
+                                               printf("Sleeped for %u seconds (but reply takes %u.%06u seconds - busy server?)\n", 
+                                                       r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
                                        } else if (r[i].out.result == diff[i].tv_sec) {
                                        } else if (r[i].out.result == diff[i].tv_sec) {
-                                               printf("Sleeped for %u seconds (reply takes %u seconds - ok)\n", 
-                                                       r[i].out.result, (uint_t)diff[i].tv_sec);
+                                               printf("Sleeped for %u seconds (reply takes %u.%06u seconds - ok)\n", 
+                                                       r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
                                        } else {
                                        } else {
-                                               printf("(Failed) - Not async - Sleeped for %u seconds (but reply takes %u seconds)\n", 
-                                                       r[i].out.result, (uint_t)diff[i].tv_sec);
+                                               printf("(Failed) - Not async - Sleeped for %u seconds (but reply takes %u.%06u seconds)\n", 
+                                                       r[i].out.result, (uint_t)diff[i].tv_sec, (uint_t)diff[i].tv_usec);
                                                /* TODO: let the test fail here, when we support async rpc on ncacn_np
                                                ret = False;*/
                                        }
                                                /* TODO: let the test fail here, when we support async rpc on ncacn_np
                                                ret = False;*/
                                        }