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 | 911c8e1c73bf3953591755ecb4c50f5644fc9c18 (patch) | |
tree | 5c9343a4ef7394d63fc7d14deacd50a1f087bccd | |
parent | 81fd19ba3f38ac19d8bcac56210a83fdfc8237de (diff) | |
download | samba-911c8e1c73bf3953591755ecb4c50f5644fc9c18.tar.gz |
r18356: doing 1000 of these requests can take over an hour under
valgrind. Reduce to 50, which is plenty for testing the code
-rw-r--r-- | source/torture/rpc/lsa.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source/torture/rpc/lsa.c b/source/torture/rpc/lsa.c index 7395a814e03..6388f61cf04 100644 --- a/source/torture/rpc/lsa.c +++ b/source/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; |