mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
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)
This commit is contained in:
parent
9aefc7d466
commit
8acd7957a2
@ -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;
|
||||
@ -2033,6 +2034,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;
|
||||
}
|
||||
@ -2740,8 +2743,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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user