1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s4:torture: add boilerplate code for vfs_fruit

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Ralph Boehme
2014-07-08 05:47:02 +02:00
committed by Volker Lendecke
parent 4a0ae592f5
commit b15da5f90b
5 changed files with 68 additions and 1 deletions

View File

@ -1169,6 +1169,14 @@ sub provision($$$$$$)
[print\$]
copy = tmp
[vfs_fruit]
path = $shrdir
vfs objects = catia fruit streams_xattr
fruit:ressource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native
";
close(CONF);

View File

@ -879,6 +879,14 @@ sub provision($$$$$$$$$)
copy = simple
ntvfs handler = cifsposix
[vfs_fruit]
path = $ctx->{share}
vfs objects = catia fruit streams_xattr
fruit:ressource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native
$extra_smbconf_shares
";

View File

@ -289,7 +289,9 @@ nbt = ["nbt.dgram" ]
libsmbclient = ["libsmbclient"]
tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap
vfs = ["vfs.fruit"]
tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap + vfs
for t in tests:
if t == "base.delaywrite":
@ -360,6 +362,9 @@ for t in tests:
# test the dirsort module.
plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
elif t == "vfs.fruit":
plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
else:
plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')

View File

@ -0,0 +1,44 @@
/*
Unix SMB/CIFS implementation.
vfs_fruit tests
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/torture.h"
#include "torture/util.h"
#include "torture/smb2/proto.h"
#include "torture/vfs/proto.h"
/*
* Note: This test depends on "vfs objects = catia fruit
* streams_xattr". Note: To run this test, use
* "--option=torture:share1=<SHARENAME1>
* --option=torture:share2=<SHARENAME2>
* --option=torture:localpath=<SHAREPATH>"
*/
struct torture_suite *torture_vfs_fruit(void)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "fruit");
suite->description = talloc_strdup(suite, "vfs_fruit tests");
return suite;
}

View File

@ -106,6 +106,8 @@ NTSTATUS torture_vfs_init(void)
suite->description = talloc_strdup(suite, "VFS modules tests");
torture_suite_add_suite(suite, torture_vfs_fruit());
torture_register_suite(suite);
return NT_STATUS_OK;