summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-07-31 23:49:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:13 -0500
commite232ec639414eb5c4ce8a3bc41c54c2db0091ece (patch)
treeb44d276cf57176a5250b26f10242e8a12689ae41 /source4/torture
parent99ad4c681c7f00774716a4e2ea7cdda062ae1607 (diff)
downloadsamba-e232ec639414eb5c4ce8a3bc41c54c2db0091ece.tar.gz
samba-e232ec639414eb5c4ce8a3bc41c54c2db0091ece.tar.bz2
samba-e232ec639414eb5c4ce8a3bc41c54c2db0091ece.zip
r8871: add some debugging code to findout why LOCAL-IRPC fails on 64bit hosts
metze (This used to be commit 2c36b64dccb30609fbc9ed68b7ab090bcbf44633)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/local/irpc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c
index a8b35d299a..6c342a9f2d 100644
--- a/source4/torture/local/irpc.c
+++ b/source4/torture/local/irpc.c
@@ -27,12 +27,18 @@
const uint32_t MSG_ID1 = 1, MSG_ID2 = 2;
+static BOOL test_debug;
+
/*
serve up AddOne over the irpc system
*/
static NTSTATUS irpc_AddOne(struct irpc_message *irpc, struct echo_AddOne *r)
{
*r->out.out_data = r->in.in_data + 1;
+ if (test_debug) {
+ printf("irpc_AddOne: in=%u in+1=%u out=%u\n",
+ r->in.in_data, r->in.in_data+1, *r->out.out_data);
+ }
return NT_STATUS_OK;
}
@@ -50,7 +56,9 @@ static BOOL test_addone(TALLOC_CTX *mem_ctx,
/* make the call */
r.in.in_data = random() & 0xFFFFFFFF;
+ test_debug = True;
status = IRPC_CALL(msg_ctx1, MSG_ID2, rpcecho, ECHO_ADDONE, &r);
+ test_debug = False;
if (!NT_STATUS_IS_OK(status)) {
printf("AddOne failed - %s\n", nt_errstr(status));
return False;
@@ -58,8 +66,8 @@ static BOOL test_addone(TALLOC_CTX *mem_ctx,
/* check the answer */
if (*r.out.out_data != r.in.in_data + 1) {
- printf("AddOne wrong answer - %u should be %u\n",
- *r.out.out_data, r.in.in_data+1);
+ printf("AddOne wrong answer - %u + 1 = %u should be %u\n",
+ r.in.in_data, *r.out.out_data, r.in.in_data+1);
return False;
}