diff options
-rwxr-xr-x | selftest/target/Samba3.pm | 8 | ||||
-rwxr-xr-x | selftest/target/Samba4.pm | 8 | ||||
-rwxr-xr-x | source3/selftest/tests.py | 7 | ||||
-rw-r--r-- | source4/torture/vfs/fruit.c | 44 | ||||
-rw-r--r-- | source4/torture/vfs/vfs.c | 2 |
5 files changed, 68 insertions, 1 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 394d6372c0..a17f2f6cc6 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -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); diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 412fbff6f0..ec0f43904f 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -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 "; diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index e9b91d468f..b4e0386379 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -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') diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c new file mode 100644 index 0000000000..2685a8fb4b --- /dev/null +++ b/source4/torture/vfs/fruit.c @@ -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; +} diff --git a/source4/torture/vfs/vfs.c b/source4/torture/vfs/vfs.c index 965c7c9620..9b82387874 100644 --- a/source4/torture/vfs/vfs.c +++ b/source4/torture/vfs/vfs.c @@ -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; |