summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Boehme <rb@sernet.de>2014-07-08 05:36:46 +0200
committerVolker Lendecke <vl@samba.org>2014-08-18 17:42:50 +0200
commite935c62657407ad4aada5484690db08f97e2de3c (patch)
tree3430db0c3ff5ac0ee2b6997c7a531a6308802aa5
parented81d09adea09082028a8beaf7599d9b63ac5d87 (diff)
downloadsamba-e935c62657407ad4aada5484690db08f97e2de3c.tar.gz
samba-e935c62657407ad4aada5484690db08f97e2de3c.tar.xz
samba-e935c62657407ad4aada5484690db08f97e2de3c.zip
s4:torture: add boilerplate code for testing specific VFS modules
Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r--source4/torture/vfs/vfs.c35
-rwxr-xr-xsource4/torture/wscript_build12
2 files changed, 46 insertions, 1 deletions
diff --git a/source4/torture/vfs/vfs.c b/source4/torture/vfs/vfs.c
new file mode 100644
index 0000000000..7341fbaad3
--- /dev/null
+++ b/source4/torture/vfs/vfs.c
@@ -0,0 +1,35 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Copyright (C) Ralph Boehme 2014
+
+ 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 "torture/smbtorture.h"
+#include "torture/vfs/proto.h"
+
+NTSTATUS torture_vfs_init(void)
+{
+ struct torture_suite *suite = torture_suite_create(
+ talloc_autofree_context(), "vfs");
+
+ suite->description = talloc_strdup(suite, "VFS modules tests");
+
+ torture_register_suite(suite);
+
+ return NT_STATUS_OK;
+}
diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build
index 39192b02a0..c0de7bbeac 100755
--- a/source4/torture/wscript_build
+++ b/source4/torture/wscript_build
@@ -150,7 +150,17 @@ bld.SAMBA_MODULE('TORTURE_NTP',
internal_module=True
)
-TORTURE_MODULES = 'TORTURE_BASIC TORTURE_RAW torture_rpc TORTURE_RAP TORTURE_AUTH TORTURE_NBENCH TORTURE_UNIX TORTURE_LDAP TORTURE_NBT TORTURE_NET TORTURE_NTP torture_registry'
+bld.SAMBA_MODULE('TORTURE_VFS',
+ source='vfs/vfs.c',
+ allow_warnings=True,
+ subsystem='smbtorture',
+ deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
+ internal_module=True,
+ autoproto='vfs/proto.h',
+ init_function='torture_vfs_init'
+ )
+
+TORTURE_MODULES = 'TORTURE_BASIC TORTURE_RAW torture_rpc TORTURE_RAP TORTURE_AUTH TORTURE_NBENCH TORTURE_UNIX TORTURE_LDAP TORTURE_NBT TORTURE_NET TORTURE_NTP torture_registry TORTURE_VFS'
bld.SAMBA_SUBSYSTEM('torturemain',
source='smbtorture.c torture.c shell.c',