1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4/torture: move deletion out of close loop in torture_smb2_maxfid()

A subsequent commit is changing the delete-on-close code in the fileserver to
open a handle on the parent directory of the file that is to be deleted.

If we've consumed all available handles, that open would fail causing a test
failure. As it's not really needed for the test semantics, don't set
delete-on-close when closing the handles, instead let the subsequent
smb2_deltree() do the cleanup.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2021-01-22 07:57:31 +01:00 committed by Jeremy Allison
parent de85bccef2
commit dd42681fe9

View File

@ -136,16 +136,6 @@ bool torture_smb2_maxfid(struct torture_context *tctx)
torture_comment(tctx, "Cleanup open files\n");
for (i = 0; i < maxfid; i++) {
union smb_setfileinfo sfinfo = { };
sfinfo.disposition_info.in.delete_on_close = 1;
sfinfo.generic.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
sfinfo.generic.in.file.handle = handles[i];
status = smb2_setinfo_file(tree, &sfinfo);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
"SETINFO failed\n");
status = smb2_util_close(tree, handles[i]);
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
"CLOSE failed\n");