summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-09-24 08:40:05 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-09-24 03:51:07 +0200
commitf0908c1dc604b304a788261784a39d08cfb48760 (patch)
tree3f9d499827d38619f2bb6f727df7818ece77584a
parent00b12674685798f300e04d6d2e62f1cfa435c982 (diff)
downloadsamba-f0908c1dc604b304a788261784a39d08cfb48760.tar.gz
samba-f0908c1dc604b304a788261784a39d08cfb48760.tar.bz2
samba-f0908c1dc604b304a788261784a39d08cfb48760.zip
torture: tidy up rpc.lsa OpenPolicy2 test to more clearly use torture_fail()
-rw-r--r--source4/torture/rpc/lsa.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 942dd5234b..27b307f2f3 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -247,22 +247,18 @@ static bool test_OpenPolicy2_fail(struct dcerpc_binding_handle *b,
return true;
}
- if (!NT_STATUS_IS_OK(r.out.result)) {
- if (NT_STATUS_EQUAL(r.out.result, NT_STATUS_ACCESS_DENIED) ||
- NT_STATUS_EQUAL(r.out.result, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) {
- torture_comment(tctx,
- "OpenPolicy2 correctly returned with "
- "result: %s\n",
- nt_errstr(r.out.result));
- return true;
- }
+ if (NT_STATUS_EQUAL(r.out.result, NT_STATUS_ACCESS_DENIED) ||
+ NT_STATUS_EQUAL(r.out.result, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) {
+ torture_comment(tctx,
+ "OpenPolicy2 correctly returned with "
+ "result: %s\n",
+ nt_errstr(r.out.result));
+ return true;
}
- torture_assert_ntstatus_equal(tctx,
- r.out.result,
- NT_STATUS_OK,
- "OpenPolicy2 return value should be "
- "ACCESS_DENIED");
+ torture_fail(tctx,
+ "OpenPolicy2 return value should be "
+ "ACCESS_DENIED or RPC_PROTSEQ_NOT_SUPPORTED");
return false;
}