summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/winreg.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 4421761dc1..2c3f542c7a 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -1414,24 +1414,34 @@ static bool test_SecurityDescriptors(struct dcerpc_pipe *p,
return ret;
}
-static bool test_DeleteKey(struct dcerpc_binding_handle *b,
- struct torture_context *tctx,
- struct policy_handle *handle, const char *key)
+static bool test_DeleteKey_opts(struct dcerpc_binding_handle *b,
+ struct torture_context *tctx,
+ struct policy_handle *handle,
+ const char *key,
+ WERROR expected_result)
{
- NTSTATUS status;
struct winreg_DeleteKey r;
+ torture_comment(tctx, "Testing DeleteKey(%s)\n", key);
+
r.in.handle = handle;
init_winreg_String(&r.in.key, key);
- status = dcerpc_winreg_DeleteKey_r(b, tctx, &r);
-
- torture_assert_ntstatus_ok(tctx, status, "DeleteKey failed");
- torture_assert_werr_ok(tctx, r.out.result, "DeleteKey failed");
+ torture_assert_ntstatus_ok(tctx, dcerpc_winreg_DeleteKey_r(b, tctx, &r),
+ "Delete Key failed");
+ torture_assert_werr_equal(tctx, r.out.result, expected_result,
+ "DeleteKey failed");
return true;
}
+static bool test_DeleteKey(struct dcerpc_binding_handle *b,
+ struct torture_context *tctx,
+ struct policy_handle *handle, const char *key)
+{
+ return test_DeleteKey_opts(b, tctx, handle, key, WERR_OK);
+}
+
static bool test_QueryInfoKey(struct dcerpc_binding_handle *b,
struct torture_context *tctx,
struct policy_handle *handle, char *kclass)