r12811: valgrind on RPC-ECHO with validate is extremely slow - speed it up if
authorAndrew Tridgell <tridge@samba.org>
Tue, 10 Jan 2006 03:18:33 +0000 (03:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:49:59 +0000 (13:49 -0500)
torture:quick is set

source/torture/rpc/echo.c

index 7df2702d0a12c8729cf6a70c2bc18f016f5ccc80..6da9cc523c1dfef5d0d39dc32258fe0d4532cfd9 100644 (file)
@@ -123,9 +123,16 @@ static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
        int i;
        NTSTATUS status;
-       int len = 200000 + (random() % 5000);
+       int len;
        struct echo_SourceData r;
 
+       if (lp_parm_bool(-1, "torture", "quick", False) &&
+           (p->conn->flags & DCERPC_DEBUG_VALIDATE_BOTH)) {
+               len = 100 + (random() % 5000);
+       } else {
+               len = 200000 + (random() % 5000);
+       }
+
        printf("\nTesting SourceData\n");
 
        r.in.len = len;
@@ -155,9 +162,16 @@ static BOOL test_sinkdata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        int i;
        NTSTATUS status;
        uint8_t *data_in;
-       int len = 200000 + (random() % 5000);
+       int len;
        struct echo_SinkData r;
 
+       if (lp_parm_bool(-1, "torture", "quick", False) &&
+           (p->conn->flags & DCERPC_DEBUG_VALIDATE_BOTH)) {
+               len = 100 + (random() % 5000);
+       } else {
+               len = 200000 + (random() % 5000);
+       }
+
        printf("\nTesting SinkData\n");
 
        data_in = talloc_size(mem_ctx, len);