From 1fc55db7339fc6425d6c8e1abdddcdd56bf33733 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 Aug 2004 13:05:03 +0000 Subject: r2107: added a SAMR async test - this one seems to work (This used to be commit 306eb848654e0cadb0ebe10c29420fc0c30a64c4) --- source4/torture/rpc/samr.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 1a48aaa944..cf354d469e 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -1990,6 +1990,45 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return ret; } +/* + try blasting the server with a bunch of sync requests +*/ +static BOOL test_EnumDomainUsers_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct samr_EnumDomainUsers r; + uint32_t resume_handle=0; + int i; +#define ASYNC_COUNT 100 + struct rpc_request *req[ASYNC_COUNT]; + + printf("Testing EnumDomainUsers_async\n"); + + r.in.handle = handle; + r.in.resume_handle = &resume_handle; + r.in.acct_flags = 0; + r.in.max_size = (uint32_t)-1; + r.out.resume_handle = &resume_handle; + + for (i=0;i