diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-11 02:58:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:18:17 -0500 |
commit | bfe8de694950e6988fcbdfd5617c44c3e5c4999d (patch) | |
tree | b3b1d6f100da23676c437417b08554ae837272e9 /source4/torture | |
parent | 8942893c3994c206f2723347a8f1aaa1fa253b41 (diff) | |
download | samba-bfe8de694950e6988fcbdfd5617c44c3e5c4999d.tar.gz samba-bfe8de694950e6988fcbdfd5617c44c3e5c4999d.tar.bz2 samba-bfe8de694950e6988fcbdfd5617c44c3e5c4999d.zip |
r18356: doing 1000 of these requests can take over an hour under
valgrind. Reduce to 50, which is plenty for testing the code
(This used to be commit 911c8e1c73bf3953591755ecb4c50f5644fc9c18)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 7395a814e0..6388f61cf0 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -514,8 +514,6 @@ BOOL test_many_LookupSids(struct dcerpc_pipe *p, return True; } -#define NUM_ASYNC_REQUESTS 1000 - static void lookupsids_cb(struct rpc_request *req) { int *replies = (int *)req->async.private; @@ -536,18 +534,21 @@ static BOOL test_LookupSids_async(struct dcerpc_pipe *p, { struct lsa_SidArray sids; struct lsa_SidPtr sidptr; - - uint32_t count[NUM_ASYNC_REQUESTS]; - struct lsa_TransNameArray names[NUM_ASYNC_REQUESTS]; - struct lsa_LookupSids r[NUM_ASYNC_REQUESTS]; + uint32_t *count; + struct lsa_TransNameArray *names; + struct lsa_LookupSids *r; struct rpc_request **req; - int i, replies; BOOL ret = True; + const int num_async_requests = 50; + + count = talloc_array(mem_ctx, uint32_t, num_async_requests); + names = talloc_array(mem_ctx, struct lsa_TransNameArray, num_async_requests); + r = talloc_array(mem_ctx, struct lsa_LookupSids, num_async_requests); - printf("\nTesting %d async lookupsids request\n", 100); + printf("\nTesting %d async lookupsids request\n", num_async_requests); - req = talloc_array(mem_ctx, struct rpc_request *, NUM_ASYNC_REQUESTS); + req = talloc_array(mem_ctx, struct rpc_request *, num_async_requests); sids.num_sids = 1; sids.sids = &sidptr; @@ -555,7 +556,7 @@ static BOOL test_LookupSids_async(struct dcerpc_pipe *p, replies = 0; - for (i=0; i<NUM_ASYNC_REQUESTS; i++) { + for (i=0; i<num_async_requests; i++) { count[i] = 0; names[i].count = 0; names[i].names = NULL; @@ -578,7 +579,7 @@ static BOOL test_LookupSids_async(struct dcerpc_pipe *p, req[i]->async.private = &replies; } - while (replies < NUM_ASYNC_REQUESTS) { + while (replies < num_async_requests) { event_loop_once(p->conn->event_ctx); if (replies < 0) { ret = False; |