summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-31 01:21:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:05 -0500
commit50c5059ab048a5a1b9b03ca78029b333197178ba (patch)
treea8b6177f2236eb1b773d14e0cbb268f28f7bd00b /source4/torture
parent89665e87b47e5cc3299c3234bf3c8b0266f9bab2 (diff)
downloadsamba-50c5059ab048a5a1b9b03ca78029b333197178ba.tar.gz
samba-50c5059ab048a5a1b9b03ca78029b333197178ba.tar.bz2
samba-50c5059ab048a5a1b9b03ca78029b333197178ba.zip
r3397: Fix IDL for ComplexPing and SimplePing, including tests
(This used to be commit cf976a6feb980b1e5116d24371fa6109092c9314)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/oxidresolve.c41
1 files changed, 36 insertions, 5 deletions
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 4acaaeecc0..a4ad897baa 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -21,13 +21,12 @@
#include "includes.h"
-static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T setid)
{
struct SimplePing r;
NTSTATUS status;
- HYPER_T h = 10;
- r.in.SetId = &h;
+ r.in.SetId = &setid;
status = dcerpc_SimplePing(p, mem_ctx, &r);
if(NT_STATUS_IS_ERR(status)) {
@@ -43,6 +42,34 @@ static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return 1;
}
+static int test_ComplexPing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T *setid)
+{
+ struct ComplexPing r;
+ NTSTATUS status;
+
+ *setid = 0;
+ ZERO_STRUCT(r.in);
+
+ r.in.SequenceNum = 0;
+ r.in.SetId = setid;
+ r.out.SetId = setid;
+
+ status = dcerpc_ComplexPing(p, mem_ctx, &r);
+ if(NT_STATUS_IS_ERR(status)) {
+ fprintf(stderr, "ComplexPing: %s\n", nt_errstr(status));
+ return 0;
+ }
+
+ if(!W_ERROR_IS_OK(r.out.result)) {
+ fprintf(stderr, "ComplexPing: %s\n", win_errstr(r.out.result));
+ return 0;
+ }
+
+
+
+ return 1;
+}
+
static int test_ServerAlive(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct ServerAlive r;
@@ -88,6 +115,7 @@ BOOL torture_rpc_oxidresolve(void)
struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
+ HYPER_T setid;
mem_ctx = talloc_init("torture_rpc_oxidresolve");
@@ -100,10 +128,13 @@ BOOL torture_rpc_oxidresolve(void)
return False;
}
- if(!test_SimplePing(p, mem_ctx))
+ if(!test_ServerAlive(p, mem_ctx))
ret = False;
- if(!test_ServerAlive(p, mem_ctx))
+ if(!test_ComplexPing(p, mem_ctx, &setid))
+ ret = False;
+
+ if(!test_SimplePing(p, mem_ctx, setid))
ret = False;
if(!test_ServerAlive2(p, mem_ctx))