diff options
author | Günther Deschner <gd@samba.org> | 2016-01-15 18:24:08 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-01-26 21:01:18 +0100 |
commit | 757ade67e6830ed66eeeb4954d1fd24d83effb13 (patch) | |
tree | 0422e30c28dad641cb9f198c496b6fb4b78b2ba1 /source4 | |
parent | 9c23f43f9edd8cfbfdd56e397748e2f74b1ef29b (diff) | |
download | samba-757ade67e6830ed66eeeb4954d1fd24d83effb13.tar.gz |
s4-torture: let smb2.replay.replay3 test deal with scale out shares.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/smb2/replay.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c index 83d36a3c0c2..f045e17b5ab 100644 --- a/source4/torture/smb2/replay.c +++ b/source4/torture/smb2/replay.c @@ -485,12 +485,17 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) struct smb2_transport *transport2 = NULL; struct smb2_session *session1_1 = tree1->session; struct smb2_session *session1_2 = NULL; + uint32_t share_capabilities; + bool share_is_so; if (smbXcli_conn_protocol(transport1->conn) < PROTOCOL_SMB3_00) { torture_skip(tctx, "SMB 3.X Dialect family required for " "Replay tests\n"); } + share_capabilities = smb2cli_tcon_capabilities(tree1->smbXcli); + share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT; + ZERO_STRUCT(break_info); break_info.tctx = tctx; transport1->oplock.handler = torture_oplock_ack_handler; @@ -522,10 +527,16 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) _h = io.out.file.handle; h = &_h; CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE); - CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b")); + if (share_is_so) { + CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("s")); + CHECK_VAL(io.out.durable_open_v2, false); + CHECK_VAL(io.out.timeout, 0); + } else { + CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b")); + CHECK_VAL(io.out.durable_open_v2, true); + CHECK_VAL(io.out.timeout, io.in.timeout); + } CHECK_VAL(io.out.durable_open, false); - CHECK_VAL(io.out.durable_open_v2, true); - CHECK_VAL(io.out.timeout, io.in.timeout); CHECK_VAL(break_info.count, 0); status = smb2_connect(tctx, @@ -571,10 +582,16 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) _h = io.out.file.handle; h = &_h; CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE); - CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b")); + if (share_is_so) { + CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("s")); + CHECK_VAL(io.out.durable_open_v2, false); + CHECK_VAL(io.out.timeout, 0); + } else { + CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b")); + CHECK_VAL(io.out.durable_open_v2, true); + CHECK_VAL(io.out.timeout, io.in.timeout); + } CHECK_VAL(io.out.durable_open, false); - CHECK_VAL(io.out.durable_open_v2, true); - CHECK_VAL(io.out.timeout, io.in.timeout); CHECK_VAL(break_info.count, 0); tree1->session = session1_1; |