summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/basic/misc.c22
2 files changed, 5 insertions, 19 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 56461005e8..5fba9b0812 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1938,7 +1938,7 @@ NTSTATUS torture_base_init(void)
torture_suite_add_smb_multi_test(suite, "bench-torture", run_torture);
torture_suite_add_1smb_test(suite, "scan-pipe_number", run_pipe_number);
torture_suite_add_1smb_test(suite, "scan-ioctl", torture_ioctl_test);
- torture_suite_add_smb_multi_test(suite, "scan-maxfid", run_maxfidtest);
+ torture_suite_add_1smb_test(suite, "scan-maxfid", torture_maxfid_test);
suite->description = talloc_strdup(suite,
"Basic SMB tests (imported from the original smbtorture)");
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index 213d923950..721727ba17 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -295,7 +295,7 @@ bool torture_holdopen(struct torture_context *tctx,
/*
test how many open files this server supports on the one socket
*/
-bool run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int dummy)
+bool torture_maxfid_test(struct torture_context *tctx, struct smbcli_state *cli)
{
#define MAXFID_TEMPLATE "\\maxfid\\fid%d\\maxfid.%d.%d"
char *fname;
@@ -347,12 +347,11 @@ bool run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int
}
}
torture_comment(tctx, "%6d\n", i);
- i--;
maxfid = i;
torture_comment(tctx, "cleaning up\n");
- for (i=0;i<maxfid/2;i++) {
+ for (i=0;i<maxfid;i++) {
asprintf(&fname, MAXFID_TEMPLATE, i/1000, i,(int)getpid());
if (NT_STATUS_IS_ERR(smbcli_close(cli->tree, fnums[i]))) {
torture_comment(tctx, "Close of fnum %d failed - %s\n", fnums[i], smbcli_errstr(cli->tree));
@@ -364,19 +363,8 @@ bool run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int
}
free(fname);
- asprintf(&fname, MAXFID_TEMPLATE, (maxfid-i)/1000, maxfid-i,(int)getpid());
- if (NT_STATUS_IS_ERR(smbcli_close(cli->tree, fnums[maxfid-i]))) {
- torture_comment(tctx, "Close of fnum %d failed - %s\n", fnums[maxfid-i], smbcli_errstr(cli->tree));
- }
- if (NT_STATUS_IS_ERR(smbcli_unlink(cli->tree, fname))) {
- torture_comment(tctx, "unlink of %s failed (%s)\n",
- fname, smbcli_errstr(cli->tree));
- correct = false;
- }
- free(fname);
-
if (torture_setting_bool(tctx, "progress", true)) {
- torture_comment(tctx, "%6d %6d\r", i, maxfid-i);
+ torture_comment(tctx, "%6d\r", i);
fflush(stdout);
}
}
@@ -389,9 +377,7 @@ bool run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int
}
torture_comment(tctx, "maxfid test finished\n");
- if (!torture_close_connection(cli)) {
- correct = false;
- }
+
return correct;
#undef MAXFID_TEMPLATE
}