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)
committerJeremy Allison <jra@samba.org>
Fri, 19 Apr 2019 17:27:12 +0000 (17:27 +0000)
Also Skip MC tests for s4 ntvfs fileserver, it's not supported at all.
Use knownfail for s3 fileserver for the time being (until socketwrapper
supports fd-passing).

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

index c588f2f5c6b1ba8e94b4112ce701280c52164459..5bc18a69168ae7f2dee055016a23540ca4763825 100644 (file)
 ^samba3.smb2.lock.*replay
 ^samba3.smb2.lease.statopen3
 ^samba3.smb2.lease.unlink # we currently do not downgrade RH lease to R after unlink
+^samba3.smb2.multichannel
 ^samba4.smb2.ioctl.compress_notsup.*\(ad_dc_ntvfs\)
 ^samba3.raw.session.*reauth2 # maybe fix this?
 ^samba3.rpc.lsa.secrets.seal # This gives NT_STATUS_LOCAL_USER_SESSION_KEY
index 3e9a25fc0a3e20ec4d2adcc0d569f396eff2e4e8..e628d7ccc85a2afb25c9028757b515394ae25faf 100644 (file)
@@ -94,6 +94,7 @@
 ^samba4.smb2.dir
 ^samba4.smb2.session
 ^samba4.smb2.compound
+^samba4.smb2.multichannel
 ^samba4.smb2.oplock.levelii501         # No test yet
 # SMB2 in s4 does not seem to support rename correctly
 ^samba4.smb2.rename.*\(ad_dc_ntvfs\)$
diff --git a/source4/torture/smb2/multichannel.c b/source4/torture/smb2/multichannel.c
new file mode 100644 (file)
index 0000000..2c72bd7
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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 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 a835dc7c0500c9069edad467d824cb28e514bed4..2a465a55ba2fe9acf2b518a18358a0b5e0fb2f4f 100644 (file)
@@ -190,6 +190,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