summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/domain.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-23 15:20:16 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-29 15:35:48 +0200
commit1248adb2c5716d26323e6e9bb1ac81103701d908 (patch)
tree448d5da0fd87d7f957fe3cf149bd4ab4b3bdc211 /source4/torture/libnet/domain.c
parent2d35523f24f7806d41d785028e09f9cb6bbfaf56 (diff)
downloadsamba-1248adb2c5716d26323e6e9bb1ac81103701d908.tar.gz
samba-1248adb2c5716d26323e6e9bb1ac81103701d908.tar.bz2
samba-1248adb2c5716d26323e6e9bb1ac81103701d908.zip
s4:torture/libnet:add explicit check for NTSTATUS r.out.result
Guenther Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture/libnet/domain.c')
-rw-r--r--source4/torture/libnet/domain.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 8c880be7fc..110a2e8f99 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -52,7 +52,6 @@ static bool test_cleanup(struct torture_context *tctx,
struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle)
{
- NTSTATUS status;
struct samr_Close r;
struct policy_handle handle;
@@ -61,11 +60,11 @@ static bool test_cleanup(struct torture_context *tctx,
torture_comment(tctx, "closing domain handle\n");
- status = dcerpc_samr_Close_r(b, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- torture_comment(tctx, "Close failed - %s\n", nt_errstr(status));
- return false;
- }
+ torture_assert_ntstatus_ok(tctx,
+ dcerpc_samr_Close_r(b, mem_ctx, &r),
+ "Close failed");
+ torture_assert_ntstatus_ok(tctx, r.out.result,
+ "Close failed");
return true;
}