[PATCH] replay4 test needs multi-channel enabled

Michael Adam obnox at samba.org
Wed Mar 2 13:26:48 UTC 2016


Review/push appreciated.

Cheers - Michael

-------------- next part --------------
From a4e8017ce855d1b1fda27491bb4a1721c4c92891 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 1 Mar 2016 23:07:06 +0100
Subject: [PATCH] torture:smb2: skip replay4 if server does not support
 multi-channel

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source4/torture/smb2/replay.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c
index 26c32d1..21f6f80 100644
--- a/source4/torture/smb2/replay.c
+++ b/source4/torture/smb2/replay.c
@@ -650,12 +650,20 @@ static bool test_replay4(struct torture_context *tctx, struct smb2_tree *tree1)
 	uint16_t curr_cs;
 	uint32_t share_capabilities;
 	bool share_is_so;
+	uint32_t server_capabilities;
 
 	if (smbXcli_conn_protocol(transport1->conn) < PROTOCOL_SMB3_00) {
 		torture_skip(tctx, "SMB 3.X Dialect family required for "
 				   "Replay tests\n");
 	}
 
+	server_capabilities = smb2cli_conn_server_capabilities(
+					tree1->session->transport->conn);
+	if (!(server_capabilities & SMB2_CAP_MULTI_CHANNEL)) {
+		torture_skip(tctx,
+			     "Server does not support multi-channel.");
+	}
+
 	share_capabilities = smb2cli_tcon_capabilities(tree1->smbXcli);
 	share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT;
 
-- 
2.5.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160302/61861e48/signature.sig>


More information about the samba-technical mailing list