From 0a427a43c4464c05bdceb662fd6d3895790ea581 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Nov 2003 10:01:20 +0000 Subject: added SinkData and SourceData tests for rpcecho (This used to be commit 7c356350e6148078725de6b6829eb0855771ae17) --- source4/torture/rpc/echo.c | 72 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index 754d0c16d3..48b004782c 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -53,7 +53,7 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) int i; NTSTATUS status; char *data_in, *data_out; - int len = 10; + int len = 17; int len_out; printf("\nTesting EchoData\n"); @@ -83,6 +83,68 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) return True; } + +/* + test the SourceData interface +*/ +static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) +{ + int i; + NTSTATUS status; + char *data_out; + int len = 100; + int len_out; + + printf("\nTesting SourceData\n"); + + status = dcerpc_rpcecho_sourcedata(p, mem_ctx, + len, + &len_out, + &data_out); + if (!NT_STATUS_IS_OK(status)) { + printf("SourceData(%d) failed\n", len); + return False; + } + printf("SourceData(%d) returned %d bytes\n", len, len_out); + + for (i=0;i