summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-19 12:03:11 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-19 12:03:11 +0000
commit1941b5cef04c39ddf89fb236d1d81167c0b25e6b (patch)
tree04aec2a2e8fdcfd61ad0ff418287951ea098d31a /source4/torture
parent4e18040236c0f51a526383800fb1de8a65ab3175 (diff)
downloadsamba-1941b5cef04c39ddf89fb236d1d81167c0b25e6b.tar.gz
samba-1941b5cef04c39ddf89fb236d1d81167c0b25e6b.tar.bz2
samba-1941b5cef04c39ddf89fb236d1d81167c0b25e6b.zip
started to expand the echo tests to include more interesting test
cases. We fail one of the alignment tests. (This used to be commit 5bb21e57b844e98cc8f1dc264bc45097c08329e3)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/echo.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index fe044fbc6c..8d8a3d7c0c 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -170,9 +170,8 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct TestCall r;
- char *s = "foo!";
- r.in.s = s;
+ r.in.s1 = "input string";
printf("\nTesting TestCall\n");
status = dcerpc_TestCall(p, mem_ctx, &r);
@@ -184,6 +183,30 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
+/*
+ test the testcall interface
+*/
+static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+{
+ NTSTATUS status;
+ struct TestCall2 r;
+ int i;
+ BOOL ret = True;
+
+ for (i=1;i<=7;i++) {
+ r.in.level = i;
+
+ printf("\nTesting TestCall2 level %d\n", i);
+ status = dcerpc_TestCall2(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("TestCall2 failed - %s\n", nt_errstr(status));
+ ret = False;
+ }
+ }
+
+ return ret;
+}
+
BOOL torture_rpc_echo(int dummy)
{
NTSTATUS status;
@@ -201,6 +224,7 @@ BOOL torture_rpc_echo(int dummy)
return False;
}
+#if 1
if (!test_addone(p, mem_ctx)) {
ret = False;
}
@@ -216,11 +240,18 @@ BOOL torture_rpc_echo(int dummy)
if (!test_sinkdata(p, mem_ctx)) {
ret = False;
}
+#endif
+
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH;
if (!test_testcall(p, mem_ctx)) {
ret = False;
}
+ if (!test_testcall2(p, mem_ctx)) {
+ ret = False;
+ }
+
printf("\n");
torture_rpc_close(p);