diff options
author | Ralph Boehme <slow@samba.org> | 2015-12-18 17:18:41 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-01-06 10:07:15 +0100 |
commit | 6dba57ef8d450ddbb84a7604d743575144c49d6b (patch) | |
tree | 635cc2942732cf46d8fdbfea91f7a3cc56917dfb | |
parent | 432e9a1157c7264af5457456bd2d85003cca6bb9 (diff) | |
download | samba-6dba57ef8d450ddbb84a7604d743575144c49d6b.tar.gz |
s4:torture:vfs_fruit: add explicit cleanup of testfiles
smb2_deltree() doesn't work with OS X (looks like OS X doesn't handle
FILE_NON_DIRECTORY_FILE correctly). As a workaround, use explicit
cleanup of all testfiles and directories.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 155397e83173e13baebfc507ad9659d0ed213b5b)
-rw-r--r-- | source4/torture/vfs/fruit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 6de564c3e56..9f5e739bb07 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -1339,8 +1339,7 @@ static bool test_write_atalk_metadata(struct torture_context *tctx, bool ret = true; AfpInfo *info; - smb2_util_unlink(tree, fname); - + smb2_deltree(tree, BASEDIR); status = torture_smb2_testdir(tree, BASEDIR, &testdirh); CHECK_STATUS(status, NT_STATUS_OK); smb2_util_close(tree, testdirh); @@ -1361,6 +1360,7 @@ static bool test_write_atalk_metadata(struct torture_context *tctx, 0, 60, 16, 8, type_creator); done: + smb2_util_unlink(tree, fname); smb2_deltree(tree, BASEDIR); talloc_free(mem_ctx); return ret; @@ -1496,6 +1496,7 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx, smb2_util_close(tree, filehandle); done: + smb2_util_unlink(tree, fname); smb2_deltree(tree, BASEDIR); talloc_free(mem_ctx); return ret; @@ -2039,6 +2040,8 @@ static bool test_aapl(struct torture_context *tctx, } done: + smb2_util_unlink(tree, fname); + smb2_deltree(tree, BASEDIR); talloc_free(mem_ctx); return ret; } @@ -2746,8 +2749,10 @@ static bool test_rename_dir_openfile(struct torture_context *torture, status = smb2_close(tree, &(cl.smb2)); } - smb2_deltree(tree, BASEDIR); + smb2_util_unlink(tree, BASEDIR "\\file.txt"); + smb2_util_unlink(tree, BASEDIR "-new\\file.txt"); smb2_deltree(tree, renamedir); + smb2_deltree(tree, BASEDIR); return ret; } |