From d0180570b3e1d0a4aa9c7a55af9fd3b4c925ec77 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze@samba.org>
Date: Mon, 12 Apr 2010 14:13:08 +0200
Subject: s4:torture/rpc/dsgetinfo: first check the rpc layer status before
 looking at the application result

metze
---
 source4/torture/rpc/dsgetinfo.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

(limited to 'source4/torture/rpc')

diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c
index b01dd773a6..acf93e8785 100644
--- a/source4/torture/rpc/dsgetinfo.c
+++ b/source4/torture/rpc/dsgetinfo.c
@@ -345,20 +345,25 @@ static bool test_getinfo(struct torture_context *tctx,
 		r.out.info_type		= &info_type;
 
 		status = dcerpc_drsuapi_DsReplicaGetInfo_r(b, tctx, &r);
-
+		if (!NT_STATUS_IS_OK(status) && p->last_fault_code == DCERPC_FAULT_INVALID_TAG) {
+			torture_comment(tctx,
+					"DsReplicaGetInfo level %d and/or infotype %d not supported by server\n",
+					array[i].level, array[i].infotype);
+			continue;
+		}
+		torture_assert_ntstatus_ok(tctx, status, talloc_asprintf(tctx,
+					"DsReplicaGetInfo level %d and/or infotype %d failed\n",
+					array[i].level, array[i].infotype));
 		if (W_ERROR_EQUAL(r.out.result, WERR_INVALID_LEVEL)) {
 			/* this is a not yet supported level */
 			torture_comment(tctx,
 					"DsReplicaGetInfo level %d and/or infotype %d not yet supported by server\n",
 					array[i].level, array[i].infotype);
 			invalid_levels++;
-		} else if (!NT_STATUS_IS_OK(status) && p->last_fault_code == DCERPC_FAULT_INVALID_TAG) {
-			torture_comment(tctx,
-					"DsReplicaGetInfo level %d and/or infotype %d not supported by server\n",
-					array[i].level, array[i].infotype);
-		}/* else {
-			torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsReplicaGetInfo");
-		}*/
+			continue;
+		}
+
+		torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsReplicaGetInfo");
 	}
 
 	if (invalid_levels > 0) {
-- 
cgit