summaryrefslogtreecommitdiff
path: root/source4/torture/ndr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-11-09 19:24:51 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:02 +0100
commit529763a9aa192a6785ba878aceeb1683c2510913 (patch)
tree5fc843ffa644969ecd967d8b4133fc19333c33b5 /source4/torture/ndr
parentb2ddeeb79d2622b3fd216465716dfa6b8c3e0b86 (diff)
downloadsamba-529763a9aa192a6785ba878aceeb1683c2510913.tar.gz
samba-529763a9aa192a6785ba878aceeb1683c2510913.tar.bz2
samba-529763a9aa192a6785ba878aceeb1683c2510913.zip
r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/ lib/registry/ lib/ldb-samba/ librpc/rpc/ auth/auth_winbind.c auth/gensec/ auth/kerberos/ dsdb/repl/ dsdb/samdb/ dsdb/schema/ torture/ cluster/ctdb/ kdc/ ntvfs/ipc/ torture/rap/ ntvfs/ utils/getntacl.c ntptr/ smb_server/ libcli/wrepl/ wrepl_server/ libcli/cldap/ libcli/dgram/ libcli/ldap/ libcli/raw/ libcli/nbt/ libnet/ winbind/ rpc_server/ metze (This used to be commit 6223c7fddc972687eb577e04fc1c8e0604c35435)
Diffstat (limited to 'source4/torture/ndr')
-rw-r--r--source4/torture/ndr/ndr.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c
index 18ede54867..e1e2918cba 100644
--- a/source4/torture/ndr/ndr.c
+++ b/source4/torture/ndr/ndr.c
@@ -42,8 +42,8 @@ static bool wrap_ndr_pull_test(struct torture_context *tctx,
ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
- torture_assert_ntstatus_ok(tctx, data->pull_fn(ndr, data->ndr_flags, ds),
- "pulling");
+ torture_assert_ndr_success(tctx, data->pull_fn(ndr, data->ndr_flags, ds),
+ "pulling");
torture_assert(tctx, ndr->offset == ndr->data_size,
talloc_asprintf(tctx,
@@ -99,13 +99,13 @@ static bool test_check_string_terminator(struct torture_context *tctx)
ndr = ndr_pull_init_blob(&blob, mem_ctx);
- torture_assert_ntstatus_ok(tctx, ndr_check_string_terminator(ndr, 1, 2),
- "simple check_string_terminator test failed");
+ torture_assert_ndr_success(tctx, ndr_check_string_terminator(ndr, 1, 2),
+ "simple check_string_terminator test failed");
torture_assert(tctx, ndr->offset == 0,
"check_string_terminator did not reset offset");
- if (NT_STATUS_IS_OK(ndr_check_string_terminator(ndr, 1, 3))) {
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_check_string_terminator(ndr, 1, 3))) {
torture_fail(tctx, "check_string_terminator checked beyond string boundaries");
}
@@ -117,17 +117,16 @@ static bool test_check_string_terminator(struct torture_context *tctx)
blob = strhex_to_data_blob("11220000");
ndr = ndr_pull_init_blob(&blob, mem_ctx);
- torture_assert_ntstatus_ok(tctx,
+ torture_assert_ndr_success(tctx,
ndr_check_string_terminator(ndr, 4, 1),
"check_string_terminator failed to recognize terminator");
- torture_assert_ntstatus_ok(tctx,
+ torture_assert_ndr_success(tctx,
ndr_check_string_terminator(ndr, 3, 1),
"check_string_terminator failed to recognize terminator");
- if (NT_STATUS_IS_OK(ndr_check_string_terminator(ndr, 2, 1))) {
- torture_fail(tctx,
- "check_string_terminator erroneously reported terminator");
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_check_string_terminator(ndr, 2, 1))) {
+ torture_fail(tctx, "check_string_terminator erroneously reported terminator");
}
torture_assert(tctx, ndr->offset == 0,