summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/winreg.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-17 11:36:09 +0100
committerGünther Deschner <gd@samba.org>2010-03-17 11:48:52 +0100
commit89eaa9ed8e52ff9447285974d2acd586257e4319 (patch)
treedf85c738350cfd00cbd016f89db1d319dc1d6e1f /source4/torture/rpc/winreg.c
parent80ba1295ec39692821b0f2af1c53124f80ae8866 (diff)
downloadsamba-89eaa9ed8e52ff9447285974d2acd586257e4319.tar.gz
samba-89eaa9ed8e52ff9447285974d2acd586257e4319.tar.bz2
samba-89eaa9ed8e52ff9447285974d2acd586257e4319.zip
s4-smbtorture: add test_DeleteKey_opts to RPC-WINREG.
Guenther
Diffstat (limited to 'source4/torture/rpc/winreg.c')
-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)