[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Feb 14 23:10:02 MST 2013


The branch, master has been updated
       via  10b96e3 Fix the maxfids test so that it does not fork lots of processes and so that it works for all cases of maxfids.
      from  daada84 tevent: Remove the previous "standard" tevent backend implementation.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 10b96e3ffe1ccec4e6866b61ddd93e04a7863bbf
Author: Richard Sharpe <realrichardsharpe at gmail.com>
Date:   Thu Feb 14 16:04:24 2013 -0800

    Fix the maxfids test so that it does not fork lots of processes and so that it works for all cases of maxfids.
    
    Signed-off-by: Richard Sharpe <realrichardsharpe at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Feb 15 07:09:59 CET 2013 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/basic/base.c |    2 +-
 source4/torture/basic/misc.c |   22 ++++------------------
 2 files changed, 5 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 5646100..5fba9b0 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 213d923..721727b 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
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list