s4:torture/rpc/dsgetinfo: first check the rpc layer status before looking at the...
authorStefan Metzmacher <metze@samba.org>
Mon, 12 Apr 2010 12:13:08 +0000 (14:13 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 14 Apr 2010 10:01:30 +0000 (12:01 +0200)
metze

source4/torture/rpc/dsgetinfo.c

index b01dd773a666a750229e638a51a4a4a7031247f4..acf93e878514f26bf2c79a756c535f767de2f444 100644 (file)
@@ -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) {