summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-11-02 19:59:47 +0100
committerGünther Deschner <gd@samba.org>2009-11-03 22:10:31 +0100
commit074ad24653e85c60b9af863ac526832229754a96 (patch)
treea770a16efb6c40fd97f25d2030f53bf7441b4e07 /source4/torture/rpc
parent463b1eb2b55ae85cfc9539c936375a989cde1076 (diff)
downloadsamba-074ad24653e85c60b9af863ac526832229754a96.tar.gz
samba-074ad24653e85c60b9af863ac526832229754a96.tar.bz2
samba-074ad24653e85c60b9af863ac526832229754a96.zip
s4-smbtorture: simplify some torture_comments in RPC-LSA.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/lsa.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 710f4c53d2..35a3b0a16b 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -2498,21 +2498,16 @@ static bool test_QueryInfoPolicyCalls( bool version2,
NTSTATUS status;
int i;
bool ret = true;
+ const char *call = talloc_asprintf(tctx, "QueryInfoPolicy%s", version2 ? "2":"");
- if (version2)
- torture_comment(tctx, "\nTesting QueryInfoPolicy2\n");
- else
- torture_comment(tctx, "\nTesting QueryInfoPolicy\n");
+ torture_comment(tctx, "\nTesting %s\n", call);
for (i=1;i<=14;i++) {
r.in.handle = handle;
r.in.level = i;
r.out.info = &info;
- if (version2)
- torture_comment(tctx, "\nTrying QueryInfoPolicy2 level %d\n", i);
- else
- torture_comment(tctx, "\nTrying QueryInfoPolicy level %d\n", i);
+ torture_comment(tctx, "\nTrying %s level %d\n", call, i);
if (version2)
/* We can perform the cast, because both types are
@@ -2543,10 +2538,7 @@ static bool test_QueryInfoPolicyCalls( bool version2,
case LSA_POLICY_INFO_AUDIT_EVENTS:
case LSA_POLICY_INFO_PD:
if (!NT_STATUS_IS_OK(status)) {
- if (version2)
- torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
- else
- torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+ torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
ret = false;
}
break;
@@ -2554,17 +2546,11 @@ static bool test_QueryInfoPolicyCalls( bool version2,
if (torture_setting_bool(tctx, "samba4", false)) {
/* Other levels not implemented yet */
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
- if (version2)
- torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
- else
- torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+ torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
ret = false;
}
} else if (!NT_STATUS_IS_OK(status)) {
- if (version2)
- torture_comment(tctx, "QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
- else
- torture_comment(tctx, "QueryInfoPolicy failed - %s\n", nt_errstr(status));
+ torture_comment(tctx, "%s failed - %s\n", call, nt_errstr(status));
ret = false;
}
break;