s4-torture: add new smb2 multichannel suite skeleton.
authorGünther Deschner <gd@samba.org>
Tue, 19 Jan 2016 13:55:03 +0000 (14:55 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 18 Sep 2018 10:34:32 +0000 (12:34 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
source4/torture/smb2/multichannel.c [new file with mode: 0644]
source4/torture/smb2/smb2.c
source4/torture/smb2/wscript_build

diff --git a/source4/torture/smb2/multichannel.c b/source4/torture/smb2/multichannel.c
new file mode 100644 (file)
index 0000000..d0f561a
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   test SMB2 multichannel operations
+
+   Copyright (C) Guenther Deschner, 2016
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "libcli/smb2/smb2.h"
+#include "libcli/smb2/smb2_calls.h"
+#include "torture/torture.h"
+#include "torture/util.h"
+#include "torture/smb2/proto.h"
+#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
+
+#define DNAME "test_dir"
+#define FNAME DNAME "\\test_create.dat"
+
+#define CHECK_STATUS(status, correct) do { \
+       if (!NT_STATUS_EQUAL(status, correct)) { \
+               torture_result(tctx, TORTURE_FAIL, \
+                       "(%s) Incorrect status %s - should be %s\n", \
+                        __location__, nt_errstr(status), nt_errstr(correct)); \
+               return false; \
+       }} while (0)
+
+static bool test_session_bind(struct torture_context *tctx,
+                             struct smb2_tree *tree)
+{
+       /* TODO */
+
+       return true;
+}
+
+struct torture_suite *torture_smb2_multichannel_init(TALLOC_CTX *ctx)
+{
+       struct torture_suite *suite = torture_suite_create(ctx, "multichannel");
+
+       torture_suite_add_1smb2_test(suite, "session-bind", test_session_bind);
+
+       suite->description = talloc_strdup(suite, "SMB2 Multichannel tests");
+
+       return suite;
+}
index 12f7edf8f86154f75700be5f613d64e4f5145086..dcee1eedcf974aa85d6e926be8a780e971d8cfac 100644 (file)
@@ -188,6 +188,7 @@ NTSTATUS torture_smb2_init(TALLOC_CTX *ctx)
        torture_suite_add_suite(suite, torture_smb2_crediting_init(suite));
 
        torture_suite_add_suite(suite, torture_smb2_doc_init(suite));
+       torture_suite_add_suite(suite, torture_smb2_multichannel_init(suite));
 
        suite->description = talloc_strdup(suite, "SMB2-specific tests");
 
index 8b0060a2831bd15fc3e446f9e44f4db5bbe1a7c5..e10d3d90ba537d8225697ad0c78c79d72647b719 100644 (file)
@@ -19,6 +19,7 @@ bld.SAMBA_MODULE('TORTURE_SMB2',
         lock.c
         maxfid.c
         maxwrite.c
+        multichannel.c
         notify.c
         notify_disabled.c
         oplock.c