1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

selftest: Add tunable for smb2.maxfid limit

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Christof Schmitt 2016-07-13 13:09:48 -07:00 committed by Jeremy Allison
parent 84992e31e1
commit f6d4380a9d

View File

@ -34,7 +34,9 @@ bool torture_smb2_maxfid(struct torture_context *tctx)
const char *dname = "smb2_maxfid";
int i, maxfid;
struct smb2_handle *handles, dir_handle = { };
const size_t max_handles = 0x41000; /* Windows 8.1 allowed 0x40000 */
size_t max_handles;
max_handles = torture_setting_int(tctx, "maxopenfiles", 0x11000);
if (!torture_smb2_connection(tctx, &tree)) {
return false;
@ -117,7 +119,11 @@ bool torture_smb2_maxfid(struct torture_context *tctx)
}
maxfid = i;
torture_comment(tctx, "Maximum number of open files: %d\n", maxfid);
if (maxfid == max_handles) {
torture_comment(tctx, "Reached test limit of %d open files. "
"Adjust to higher test with "
"--option=torture:maxopenfiles=NNN\n", maxfid);
}
torture_comment(tctx, "Cleanup open files\n");