summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-11-12 03:11:58 +0200
committerAndrew Bartlett <abartlet@samba.org>2009-11-17 10:46:48 +1100
commit673049142b9f5e002ddbae7b3aeb051b0a6ecdc2 (patch)
treeb3b9858b0da107e1e4c827edf2031037161a58ee /source4/torture/rpc
parent9e4beef61407cb884cb36577769a08148f1e1eea (diff)
downloadsamba-673049142b9f5e002ddbae7b3aeb051b0a6ecdc2.tar.gz
samba-673049142b9f5e002ddbae7b3aeb051b0a6ecdc2.tar.bz2
samba-673049142b9f5e002ddbae7b3aeb051b0a6ecdc2.zip
s4/drs(tort): replace 'printf' with 'torture_...' calls
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/dssync.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 58a7f94758..7d8dc9216a 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -956,7 +956,6 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
struct DsSyncTest *ctx)
{
NTSTATUS status;
- bool ret = true;
struct drsuapi_DsGetNT4ChangeLog r;
union drsuapi_DsGetNT4ChangeLogRequest req;
union drsuapi_DsGetNT4ChangeLogInfo info;
@@ -986,38 +985,40 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
status = dcerpc_drsuapi_DsGetNT4ChangeLog(ctx->new_dc.drsuapi.drs_pipe, ctx, &r);
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
- printf("DsGetNT4ChangeLog not supported by target server\n");
- break;
+ torture_skip(tctx, "DsGetNT4ChangeLog not supported by target server");
} else if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
errstr = dcerpc_errstr(ctx, ctx->new_dc.drsuapi.drs_pipe->last_fault_code);
}
- printf("dcerpc_drsuapi_DsGetNT4ChangeLog failed - %s\n", errstr);
- ret = false;
+ torture_fail(tctx,
+ talloc_asprintf(tctx, "dcerpc_drsuapi_DsGetNT4ChangeLog failed - %s\n",
+ errstr));
} else if (W_ERROR_EQUAL(r.out.result, WERR_INVALID_DOMAIN_ROLE)) {
- printf("DsGetNT4ChangeLog not supported by target server\n");
- break;
+ torture_skip(tctx, "DsGetNT4ChangeLog not supported by target server");
} else if (!W_ERROR_IS_OK(r.out.result)) {
- printf("DsGetNT4ChangeLog failed - %s\n", win_errstr(r.out.result));
- ret = false;
+ torture_fail(tctx,
+ talloc_asprintf(tctx, "DsGetNT4ChangeLog failed - %s\n",
+ win_errstr(r.out.result)));
} else if (*r.out.level_out != 1) {
- printf("DsGetNT4ChangeLog unknown level - %u\n", *r.out.level_out);
- ret = false;
+ torture_fail(tctx,
+ talloc_asprintf(tctx, "DsGetNT4ChangeLog unknown level - %u\n",
+ *r.out.level_out));
} else if (NT_STATUS_IS_OK(r.out.info->info1.status)) {
} else if (NT_STATUS_EQUAL(r.out.info->info1.status, STATUS_MORE_ENTRIES)) {
cookie.length = r.out.info->info1.length1;
cookie.data = r.out.info->info1.data1;
continue;
} else {
- printf("DsGetNT4ChangeLog failed - %s\n", nt_errstr(r.out.info->info1.status));
- ret = false;
+ torture_fail(tctx,
+ talloc_asprintf(tctx, "DsGetNT4ChangeLog failed - %s\n",
+ nt_errstr(r.out.info->info1.status)));
}
break;
}
- return ret;
+ return true;
}
bool torture_rpc_dssync(struct torture_context *torture)