selftest: run smbtorture3 SMB2-BASIC tests against additional shares
authorRalph Boehme <slow@samba.org>
Thu, 26 Jul 2018 16:13:44 +0000 (18:13 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 27 Jul 2018 14:04:02 +0000 (16:04 +0200)
This runs the smbtorture3 SMB2-BASIC and smb2.compound_find tests against shares
with "smbd:async dosmode" enabled.

On the vfs_aio_pthread_async_dosmode_force_sync* shares we
force a sync threadpool which ensures we test behaviour on systems that
don't support unshare(CLONE_FS) and also don't support
per-thread-credentials. This simulates the code path of non linux
systems. And makes sure that we don't regress there.

We also test with xattr_tdb and without.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul 27 16:04:02 CEST 2018 on sn-devel-144

selftest/target/Samba3.pm
source3/selftest/tests.py

index 253acf7aa5f56f4bf52ecfeec5c2079347794887..5b8cf9ea6d816ef9485ab389fc95b425d609eabd 100755 (executable)
@@ -777,6 +777,48 @@ sub setup_simpleserver
        aio_pthread:aio open = yes
        smbd:async dosmode = no
 
+[vfs_aio_pthread_async_dosmode_default1]
+       path = $prefix_abs/share
+       read only = no
+       vfs objects = aio_pthread
+       store dos attributes = yes
+       aio_pthread:aio open = yes
+       smbd:async dosmode = yes
+
+[vfs_aio_pthread_async_dosmode_default2]
+       path = $prefix_abs/share
+       read only = no
+       vfs objects = aio_pthread xattr_tdb
+       store dos attributes = yes
+       aio_pthread:aio open = yes
+       smbd:async dosmode = yes
+
+[vfs_aio_pthread_async_dosmode_force_sync1]
+       path = $prefix_abs/share
+       read only = no
+       vfs objects = aio_pthread
+       store dos attributes = yes
+       aio_pthread:aio open = yes
+       smbd:async dosmode = yes
+       # This simulates non linux systems
+       smbd:force sync user path safe threadpool = yes
+       smbd:force sync user chdir safe threadpool = yes
+       smbd:force sync root path safe threadpool = yes
+       smbd:force sync root chdir safe threadpool = yes
+
+[vfs_aio_pthread_async_dosmode_force_sync2]
+       path = $prefix_abs/share
+       read only = no
+       vfs objects = aio_pthread xattr_tdb
+       store dos attributes = yes
+       aio_pthread:aio open = yes
+       smbd:async dosmode = yes
+       # This simulates non linux systems
+       smbd:force sync user path safe threadpool = yes
+       smbd:force sync user chdir safe threadpool = yes
+       smbd:force sync root path safe threadpool = yes
+       smbd:force sync root chdir safe threadpool = yes
+
 [vfs_aio_fork]
        path = $prefix_abs/share
         vfs objects = aio_fork
index bf0ba2a44546e5a358ec1aca1accc67fbaad239b..b2b2ff2607751ceace54b2c240e812c66ba5b0f0 100755 (executable)
@@ -119,6 +119,17 @@ for t in tests:
     plantestsuite("samba3.smbtorture_s3.vfs_aio_pthread(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_pthread', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
 
+shares = [
+    "vfs_aio_pthread_async_dosmode_default1",
+    "vfs_aio_pthread_async_dosmode_default2",
+    "vfs_aio_pthread_async_dosmode_force_sync1",
+    "vfs_aio_pthread_async_dosmode_force_sync2"
+]
+for s in shares:
+    plantestsuite("samba3.smbtorture_s3.%s(simpleserver).SMB2-BASIC" % s, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), 'SMB2-BASIC', '//$SERVER_IP/' + s, '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
+    t = "smb2.compound_find"
+    plansmbtorture4testsuite(t, "simpleserver", "//%s/%s %s" % ('$SERVER_IP', s, ' -U$USERNAME%$PASSWORD'), description=s)
+
 posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK",
               "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK" ]