diff options
| author | David Disseldorp <ddiss@samba.org> | 2014-06-20 19:14:14 +0200 |
|---|---|---|
| committer | Michael Adam <obnox@samba.org> | 2014-06-21 12:42:10 +0200 |
| commit | b8b4d88846cef595740ec8ad1d7586e539ed5258 (patch) | |
| tree | 27072503d729be877c06f5881baefb14835eb193 /source4/torture/rpc | |
| parent | 3d65bfe0fa41878a98ae14bdbf0074bb01371ad9 (diff) | |
| download | samba-b8b4d88846cef595740ec8ad1d7586e539ed5258.tar.gz samba-b8b4d88846cef595740ec8ad1d7586e539ed5258.tar.xz samba-b8b4d88846cef595740ec8ad1d7586e539ed5258.zip | |
torture: add FSRVP message sequence timeout test
Sleep at various points in the FSRVP snapshot creation state machine,
and confirm that the state timeout is reflected in subsequent server
responses.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/torture/rpc')
| -rw-r--r-- | source4/torture/rpc/fsrvp.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c index 42247fdff0..cd3794af6c 100644 --- a/source4/torture/rpc/fsrvp.c +++ b/source4/torture/rpc/fsrvp.c @@ -723,6 +723,29 @@ static bool test_fsrvp_enum_created(struct torture_context *tctx, return true; } +static bool test_fsrvp_seq_timeout(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + int i; + struct fssagent_share_mapping_1 *sc_map; + char *share_unc = talloc_asprintf(tctx, "\\\\%s\\%s", + dcerpc_server_name(p), FSHARE); + + for (i = TEST_FSRVP_TOUT_NONE; i <= TEST_FSRVP_TOUT_COMMIT; i++) { + torture_assert(tctx, test_fsrvp_sc_create(tctx, p, share_unc, + i, &sc_map), + "sc create"); + + /* only need to delete if create process didn't timeout */ + if (i == TEST_FSRVP_TOUT_NONE) { + torture_assert(tctx, test_fsrvp_sc_delete(tctx, p, sc_map), + "sc del"); + } + } + + return true; +} + static bool fsrvp_rpc_setup(struct torture_context *tctx, void **data) { NTSTATUS status; @@ -759,6 +782,8 @@ struct torture_suite *torture_rpc_fsrvp(TALLOC_CTX *mem_ctx) /* override torture_rpc_setup() to set DCERPC_NDR_REF_ALLOC */ tcase->tcase.setup = fsrvp_rpc_setup; + torture_rpc_tcase_add_test(tcase, "seq_timeout", + test_fsrvp_seq_timeout); torture_rpc_tcase_add_test(tcase, "enum_created", test_fsrvp_enum_created); torture_rpc_tcase_add_test(tcase, "sc_share_io", |
