diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-04 02:28:08 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-04 02:28:08 +0000 |
commit | 994301bfec372f0b929a61425fc1eb180d16cbb1 (patch) | |
tree | 21e43de4ef765bbbcf28fbc2f8ca02c6cd86a572 /source4/torture | |
parent | 0a427a43c4464c05bdceb662fd6d3895790ea581 (diff) | |
download | samba-994301bfec372f0b929a61425fc1eb180d16cbb1.tar.gz samba-994301bfec372f0b929a61425fc1eb180d16cbb1.tar.bz2 samba-994301bfec372f0b929a61425fc1eb180d16cbb1.zip |
added fragmentation support on receive for dcerpc packets. I have
successfully used SourceData with 200M of data in rpcecho
(This used to be commit a9aa7954fe84c925bb158af8b73aa71b7ea84e2b)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/echo.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index 48b004782c..834eb1f678 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -69,7 +69,7 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) &len_out, &data_out); if (!NT_STATUS_IS_OK(status)) { - printf("EchoData(%d) failed\n", len); + printf("EchoData(%d) failed - %s\n", len, nt_errstr(status)); return False; } printf("EchoData(%d) returned %d bytes\n", len, len_out); @@ -92,7 +92,7 @@ static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) int i; NTSTATUS status; char *data_out; - int len = 100; + int len = 200000; int len_out; printf("\nTesting SourceData\n"); @@ -102,13 +102,14 @@ static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) &len_out, &data_out); if (!NT_STATUS_IS_OK(status)) { - printf("SourceData(%d) failed\n", len); + printf("SourceData(%d) failed - %s\n", len, nt_errstr(status)); return False; } printf("SourceData(%d) returned %d bytes\n", len, len_out); for (i=0;i<len;i++) { - if (data_out[i] != (i & 0xFF)) { + unsigned char *v = (unsigned char *)data_out; + if (v[i] != (i & 0xFF)) { printf("bad data 0x%x at %d\n", data_out[i], i); return False; } @@ -138,7 +139,7 @@ static BOOL test_sinkdata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) len, data_in); if (!NT_STATUS_IS_OK(status)) { - printf("SinkData(%d) failed\n", len); + printf("SinkData(%d) failed - %s\n", len, nt_errstr(status)); return False; } @@ -159,6 +160,11 @@ BOOL torture_rpc_echo(int dummy) return False; } + if (!test_sourcedata(p, mem_ctx)) { + ret = False; + } + return ret; + if (!test_addone(p, mem_ctx)) { ret = False; } |