diff options
author | Andreas Schneider <asn@samba.org> | 2011-01-25 22:50:42 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-01-27 14:41:41 +0100 |
commit | 43f766dd0494e4b6c52a5e8bdffd5e82740d13ae (patch) | |
tree | 090d6bc740de89b4a202c247bd4b08114074dc78 /source4 | |
parent | fed2b6167a1c01e2492d03c0293a7cb8994d470d (diff) | |
download | samba-43f766dd0494e4b6c52a5e8bdffd5e82740d13ae.tar.gz samba-43f766dd0494e4b6c52a5e8bdffd5e82740d13ae.tar.bz2 samba-43f766dd0494e4b6c52a5e8bdffd5e82740d13ae.zip |
s4-torture: Use binding handle in epm_Delete test.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/epmapper.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c index 53ab4e07fd..77c93631fb 100644 --- a/source4/torture/rpc/epmapper.c +++ b/source4/torture/rpc/epmapper.c @@ -350,13 +350,28 @@ static bool test_Lookup_terminate_search(struct torture_context *tctx, static bool test_Delete(struct torture_context *tctx, struct dcerpc_binding_handle *h, - struct epm_entry_t *entries) + const char *annotation, + struct dcerpc_binding *b) { NTSTATUS status; struct epm_Delete r; r.in.num_ents = 1; - r.in.entries = entries; + r.in.entries = talloc_array(tctx, struct epm_entry_t, 1); + + ZERO_STRUCT(r.in.entries[0].object); + r.in.entries[0].annotation = annotation; + + r.in.entries[0].tower = talloc(tctx, struct epm_twr_t); + + status = dcerpc_binding_build_tower(tctx, + b, + &r.in.entries[0].tower->tower); + + torture_assert_ntstatus_ok(tctx, + status, + "Unable to build tower from binding struct"); + r.in.num_ents = 1; status = dcerpc_epm_Delete_r(h, tctx, &r); if (NT_STATUS_IS_ERR(status)) { @@ -417,7 +432,7 @@ static bool test_Insert_noreplace(struct torture_context *tctx, torture_assert(tctx, r.out.result == 0, "epm_Insert failed"); - ok = test_Delete(tctx, h, r.in.entries); + ok = test_Delete(tctx, h, "smbtorture", b); if (!ok) { return false; } |